Bug 162860

Summary: mount of floppy ignores umask of user
Product: [Fedora] Fedora Reporter: Alfred Ganz <alfred-ganz+bug>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-20 11:54:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alfred Ganz 2005-07-10 18:08:03 UTC
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):
util-linux-2.12a-24.3

How reproducible:
Always

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 11:54:48 UTC
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").