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.
Assignee: bugsquad => pkg-bugsSummary: 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.Source RPM: Photorec => testdisk-7.1-2.mga8.src.rpm
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