Bug 162860 - mount of floppy ignores umask of user
mount of floppy ignores umask of user
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2005-07-10 14:08 EDT by Alfred Ganz
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: 2005-10-20 07:54:48 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 Alfred Ganz 2005-07-10 14:08:03 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.7.8-1.3.1

Description of problem:
The man page for mount says, and earlier versions of mount did restrict the permissions for a fat filesystem to the umask of the process. I am trying to
mount a floppy (with an entry in /etc/fstab) with a restricting umask. To be
specific, I have my various private keys on the floppy, and ssh insists on them
not being world readable! Note that mount doesn't allow setting of options for
console users.

I first thought this was related to selinux, but changing the options in /etc/fstab to pamconsole,exec,noauto does not change things, also this happens
both with or without the floppy being read protected.

Adding the umask=0077 to the options in /etc/fstab is a possible workaround,
but in order to make the device managed again, this requires a special fdi
file in /usr/share/hal/fdi, and in both cases it can't easily be limited to
only specific floppys.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. As regular user do ( umask 0077 ; mount /media/floppy )
2. check the permissions in /media/floppy, they should be user only

Actual Results:  Files are world readable

Expected Results:  Files should be owner readable only

Additional info:
Comment 1 Karel Zak 2005-10-20 07:54:48 EDT
The mount command ignores uses' umask. The mount always sets umask(022) and
overwrites your umask. It's feature. You have to use the "umask=" mount option
(in fstab or by "-o umask=0077").

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