Description of problem: Qphotorec is integrated with Photorec package in Mageia. I have installed photorec and I can see Qphotorec in System tools menu section, but when I open it, appears a warning that say me "It can't found the hard disk because it is necesary be root user for use Photorec". This doesn't make any sense if a normal user don't know how open it in terminal, and either know how modify this application from menu settings. I have modified this application in applications settings, in menu settings, for open it as root, and when I open it, the application request me the root password. I think that this operation is more appropriate and the package install should configure the direct access with root execution. Version-Release number of selected component (if applicable):Photorec and Mageia 8 How reproducible: Install Photorec and execute Qphotorec from menu applications Steps to Reproduce: 1. Install Photorec 2. Execute Qphotorec from menu applications 3. The warning appears.
Created attachment 13032 [details] Qphotorec no-root Here, Qphotored executed with normal user.
Created attachment 13033 [details] Qphotorec root Here, Qphotorec executed whit root user.
Thank you for your report, and the work you have done. This is delicate: you should certainly need to have root privileges to run this thing, but allowing this directly for any GUI program is verboten. Your solution - dialogue for root password - is the standard one for GUI applications which need root privileges; well done for implementing it. Just trying it. If you start Qphotorec from the menu, it does pop the dialogue "No Disk! No harddisk found. You need to be root to use PhotoRec." OK'ing this opens the application but with no discs listed. The same thing happens from terminal: $ qphotorec However, doing this as root: # qphotorec does work, and the application lists partitions on the current disk. Trying straight photorec from a terminal as normal user gives: $ photorec PhotoRec 7.1, Data Recovery Utility, July 2019 Christophe GRENIER <grenier@cgsecurity.org> https://www.cgsecurity.org PhotoRec is free software, and comes with ABSOLUTELY NO WARRANTY. No harddisk found You need to be root to use PhotoRec. Doing it as root presents a correct curses display. --------------------------------------------------- This is part of the 'testdisk' SRPM, which has no particular maintainer; so assigning this bug globally. Please look at it: Jose's adaptation is very worthwhile.
Source RPM: Photorec => testdisk-7.1-2.mga8.src.rpmSummary: Qphotorec show warning because don't open with root user => Qphotorec run as normal user shows warning, and is ineffective; this bug adds a root password dialogue which makes it work correctly.Assignee: bugsquad => pkg-bugs
Thanks for the comment!!, I simply configured in the applications menu, the Qphotorec shortcut to open with root user. I understand that the Mageia photorec rpm should be modified, so that when it is installed, it creates that shortcut with that configuration in the applications menu. Greetings!!!
This is still unresolved, I don't know if it is very difficult to modify the behavior so that it requests root permissions when running it.
I think it is correct behaviour and is to be expected to need to run this as root.
CC: (none) => fri
Could you report this issue upstream at https://github.com/cgsecurity/testdisk/issues , please? To see what upstream says and think about root privileges.
CC: (none) => geiger.david68210
We stopped supporting Mageia 8 almost 8 months ago https://blog.mageia.org/en/2023/12/30/mageia-8-end-of-life/ That means we also stopped fixing Mageia 8 bugs and that this bug report needs to be closed, regardless of whether it was fixed for Mageia 8 or not. If this particular bug did not get fixed for Mageia 8, then we do regret that. If this issue is still present in Mageia 9 or cauldron, then please reopen this report, write a comment and adjust the "Version:" field. If you are not yet a member of one or our teams, then please consider becoming one. https://wiki.mageia.org/en/Contributing Mageia is a community project, meaning that we, the users, make Mageia together. The more active contributors we have, the more bug reports will get fixed. Besides, being active in a team can be very rewarding. It was and is certainly rewarding to me :-D
Resolution: (none) => OLDStatus: NEW => RESOLVED
Still valid José, what about comment 7?
Version: 8 => 9Severity: normal => enhancementStatus: RESOLVED => REOPENEDResolution: OLD => (none)
Sorry, I had forgotten to report it. Here it is: https://github.com/cgsecurity/testdisk/issues/161 I hope you answer me.
Hello! I have an upstream response about this error, but... it's not very resolving... You can see it here https://github.com/cgsecurity/testdisk/issues/161#issuecomment-2323418012
Ah so I suggest the dialogue Qphotorec shows can be improved by including the given clarification: If you want to operate on disk, please launch Qphotorec with root privileges. QPhotorec can be used by a non-root user to analyse raw image files and encase/ewf files (if encase support has been enable during compilation).
I think it's the right thing to do.
:) Please forward the suggestion to upstream.
Hi. I have commented in upstream the same text of comment 12. Anyway, I think that from Mageia, we can to do the app show this warning and offer to user a option for open as root requesting the password. Greetings.
I get just other report about this why not add a polkit policy?
Source RPM: testdisk-7.1-2.mga8.src.rpm => testdisk-7.1-4.mga9CC: (none) => j.alberto.vc