Bug 465967 - rpm creates files using current umask, may make files unaccessible to users
Summary: rpm creates files using current umask, may make files unaccessible to users
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 8
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-07 13:49 UTC by David Jansen
Modified: 2008-11-19 10:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-19 10:41:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Jansen 2008-10-07 13:49:17 UTC
Root's umask is set to 077, so files created by root are by default only
readable by root. Safest setting, so quite ok.
Now root runs an rpm or yum command to install or update files. Umask
setting is not used for the files extracted from the rpm, those get the
permissions as stored inside the package. 
But root's umask appears to be in effect for the scripts that run from the rpm. also, directories not owned by the rpm are created with the default permissions.

Most notably: various files in /usr/share/mime become inaccessibel to
normal users after root manually installs updates, if those updates call for one of those tools that update the mime bindings. 
Similarly, after the last update of tetex, files like /usr/share/texmf/ls-R were only readable for root.

If I explicitly execute 'umask 022; yum upgrade', there is no
problem. So I think this is a bug in yum/rpm.

Actually, I have been having problems with files like those in
/usr/share/mime for a long time, probably since Fedora 8 came out, I
just never correlated the problem to the way the updates were installed
until now.

On Fedora 9, I have not been able to reproduce the problem, even though
the umask settings are the same.

PS: umask is set in /etc/bashrc, which is unmodified on these systems as installed by the setup package

Comment 1 David Jansen 2008-11-19 10:41:03 UTC
Problem seems limited to Fedora 8. No problem in Fedora 9 and Fedora 10 preview, so bug can be closed when Fedora 8 reaches end of life.


Note You need to log in before you can comment on or make changes to this bug.