Bugzilla – Bug 1111906
Redshift unable to read config file - fopen permission denied
Last modified: 2018-10-18 14:04:56 UTC
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0
Installing redshift via zypper results in a broken application - redshift can't read my configuration file. It can run on it's own, but then it doesn't read my config file.
I downloaded the most-recent redshift release from github and the resulting binary isn't effected by this problem, so it seems it has something to do with how it's built on OBS.
Steps to Reproduce:
1. Install redshift using zypper
2. Invoke redshift from the command line
/usr/bin/redshift -c ~/.config/redshift/redshift.conf
fopen: Permission denied
Unable to load config file.
redshift-1.12 from tumbleweed works without any problems for me.
so what about permissions on your config file?
and your what is in your config file ?
+ strace of /usr/bin/refshift -c .config/.... will be nice
I have the same issue. Here's the output from `strace /usr/bin/redshift -c ~/.config/redshift/redshift.conf`
> so it seems it has something to do with how it's built on OBS.
no, this isn't even possible, rpm packages cannot touch $HOME files.
I'm not unable to reproduce without config file set to bad permissions (chmod a-r), so please check permissions of config file and path to it.
@Dany thx for strace .. it looks same as my strace with bad permissions
ahh, maybe I have cause of problem ... apparmor
yes, redshift-1.12 has apparmor profile allowing read-only for old path config file.
so temporary solution is copy config to ~/.config/redshift.conf.
@chris .. so if you used Git version it works with your config in new location. As it has proper apparmor profile.
fix in devel repo and on the way to TW
This is an autogenerated message for OBS integration:
This bug (1111906) was mentioned in
https://build.opensuse.org/request/show/642728 Factory / redshift
(In reply to Ondřej Súkup from comment #7)
> fix in devel repo and on the way to TW
Thanks for looking into this. I moved my config file into the old location, but the error is still occurring - the temporary solution doesn't seem to work.
I'll work with my github build of redshift until the new version lands in tumbleweed, and report back whether it works again or not.
For reference here is a link to my current redshift.conf file:
And here is the output of strace:
(In reply to Chris Coutinho from comment #9)
> (In reply to Ondřej Súkup from comment #7)
> > fix in devel repo and on the way to TW
> Hi Ondrej,
> Thanks for looking into this. I moved my config file into the old location,
> but the error is still occurring - the temporary solution doesn't seem to
> I'll work with my github build of redshift until the new version lands in
> tumbleweed, and report back whether it works again or not.
as I said .. live version has different apparmor profile than last stable release
> For reference here is a link to my current redshift.conf file:
> And here is the output of strace:
looks same as @dany's and my personal .. system simply reject acces to this file --> permissions on file or lsm like apparmor or selininux reject redshift from reading file.
+- in few days patched version with profile allowing both locations will land in TW.
PS: you can check apparmor using `yast2 apparmor` command and then view audit log