-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mintsources sets incorrect permissions on written files when user has umask set #97
Comments
Also reported here - https://bugs.launchpad.net/linuxmint/+bug/1695731 - not sure which is the right place. |
I'm guessing this could be affected by different ways of running sudo e.g. see issue #75 |
Further tests suggest a switch to pkexec could fix this:
i.e. pkexec ignores the 027 umask, instead using 022 which is the umask for root I think, while sudo uses the users umask. |
Retesting on Linux Mint 18.3 shows mintsources uses pkexec and user's umask is not used for writing to /etc. |
Worth noting that the quick resolution to this issue is to set a+r on the repo file (using Mint 18.3 (XFCE)). Running this command: Resolves this issue:
This is reported in mintupdate as a corrupt apt cache file and prompts to switch mirrors. |
@xenopeek why was this issue closed? as you can see at linuxmint/mintupdate#363 (comment) i'm pretty sure there still a permission-bug present. isn't it possible to add a |
I already noted why I closed this issue. I can't reproduce it with the steps you shared; the cause of your issue must be something you haven't identified yet through troubleshooting. Retested on Linux Mint 18.3 Cinnamon and 19 Cinnamon. Set
Afterwards the file I also manually set permissions of Thus the cause of your issue must be found in some other action you performed. At least I can't reproduce it. You can ask for help on the forums with troubleshooting, to find the steps to reproduce your issue. |
ok, now we've got the point! 😉 sorry for not being 100% specific: but you are right @xenopeek, @spookylukey talked about setting umask to 027 in his profile... so i'm not sure what his issue is. 😕 should we create a separate issue for UMASK-settings in |
@spookylukey @DJCrashdummy I think my issue was fixed by the switch to pkexec a while back. I guess opening a new issue would be best, since the original issue is fixed AFAICS. |
I have 'umask 027' set in my profile, to protect my files from being read by other users on the system by default. (This allows me, for example, to have guest use my computer with a guest account while having private files in my own area).
When I run
mintsources
and choose a different mirror, the files/etc/apt/sources.list.d/official-package-repositories.list
get rewritten, and at the same time, the new permissions get set using umask 027:Before:
After:
The result is that various things that rely on users being able to read these files stop working. In particular,
apt-cache search foo
reports:Also, the Mint Update Manager often reports an error about the APT cache being corrupted.
These errors are fixed by changing the permissions back to what they were.
Expected behaviour:
Either, the new files should be written ignoring the user's umask (this is probably correct behaviour for a tool that runs as root),
Or, the new files should be written with permissions that allow Mint's own package management tools to continue working,
Or, the new files should be written with the same permissions that they were before.
The text was updated successfully, but these errors were encountered: