Bug 220428 - update-mime-database needs to explicitly set umask
update-mime-database needs to explicitly set umask
Status: CLOSED DUPLICATE of bug 195414
Product: Fedora
Classification: Fedora
Component: shared-mime-info (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bastien Nocera
Depends On:
  Show dependency treegraph
Reported: 2006-12-21 02:40 EST by Andrew Kroeger
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-19 10:06:28 EDT
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 Andrew Kroeger 2006-12-21 02:40:56 EST
Description of problem:
After my initial FC6 install, Evince worked fine for viewing PDFs.  After
installing some FC6 updates (I've updated multiple times, so I'm not sure when
or which update caused the problem) Evince would give me the error "Unhandled
MIME type: applicaion/x-extension-pdf" and would not open the file.  A quick
Google search led me to
http://forums.fedoraforum.org/archive/index.php/t-104477.html, which indicated
one user had the same problem because files under /usr/share/mime were only
readable by root.  I found that my files under /usr/share/mime were also only

Querying the RPM database showed those files were not owned by any RPM, but the
/usr/share/mime directory was owned by shared-mime-info.  Looking at the files
in shared-mime-info, I found update-mime-database, and also found that
update-mime-database is called in the postinstall script.  Further checking
indicated that other RPM install scripts also call update-mime-database.  I run
my system under umask 0077 for all users and finally realized that during one of
the updates I installed, update-mime-database was called from an RPM script and
inherited root's umask, thus creating all files as only root-readable.

To test my theory, I changed root's umask in one of my shells and manually ran
"/usr/bin/update-mime-database /usr/share/mime".  After that run, I checked and
all files under /usr/share/mime were now world-readable.  After manually
removing ~/.local/share/mime, Evince was now able to view PDF files again.

Version-Release number of selected component (if applicable):
Comment 1 Bastien Nocera 2007-04-19 10:06:28 EDT

*** This bug has been marked as a duplicate of 195414 ***

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