Description of problem: If a qt program is run by root, the program is able to write a file /usr/lib/qt-3.3/etc/settings/qt_plugins_3.3rc. This file is created with mode 600 permissions. When a normal user then tries to run a qt program (hp-toolbox from hplip in this case), the following error is emitted: [bjohnson@localhost settings]$ hp-toolbox HP Linux Imaging and Printing System (ver. 0.9.9) HP Device Manager ver. 6.2 Copyright (c) 2003-6 Hewlett-Packard Development Company, LP This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to distribute it under certain conditions. See COPYING file for more details. QSettings: failed to open file '/usr/lib/qt-3.3/etc/settings/qt_plugins_3.3rc' [bjohnson@localhost settings]$ This is a minor problem, as it seem to not affect the operation of the program at all. It is however confusing when you have other problems you are trying to solve and not sure if this is related. Version-Release number of selected component (if applicable): qt-3.3.5-13 How reproducible: always Steps to Reproduce: 1. run qt program as root 2. run qt program as normal user 3. Actual results: QSettings: failed to open file '/usr/lib/qt-3.3/etc/settings/qt_plugins_3.3rc' Expected results: No error Additional info:
qt uses the default umask setting to set the file permission when it's created. It seems your umask setting is not correct here. set umask 0022 will fix the problem
Oh, I see now. It's actually line 272 in hp-toolbox setting the umask (0.9.10-1.3).
It still seems to me the root of the problem is that qt should set the umask to a sane value before it writes a file that _everyone_ is expected to be able to use.
I agree with Bernard. Can't qt use chmod on that file if it's meant to be globally readable?
I have taken a look at the hp-toolbox and qt source. Qt tries to read the global setting first and then the local settings in $HOME/.qt. So this warning is needless here and should be ignored. I will disable this annoying warning in next Qt rebuild.
I still get this "annoying warning" with qt-3.3.6-0.4.fc5 (the latest from updates-testing); maybe the fix for the warning slipped through the cracks? It would be good to get rid of it, as it just causes noise every time I run any QT app from the command line.
Just saw a report of this with FC6 on fedora-list as well. Re-opening.
it's now really fixed in qt-3.3.7-1.fc7. The fix will be included in next qt build for FC6 update.