Bug 465967 - rpm creates files using current umask, may make files unaccessible to users
rpm creates files using current umask, may make files unaccessible to users
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-10-07 09:49 EDT by David Jansen
Modified: 2008-11-19 05:41 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-11-19 05:41:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Jansen 2008-10-07 09:49:17 EDT
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 05:41:03 EST
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.