RE: OT: Linux df question

  • From: "Sweetser, Joe" <JSweetser@xxxxxxxx>
  • To: De DBA <dedba@xxxxxxxxxx>
  • Date: Mon, 14 Jul 2014 13:26:47 +0000

Tony,

Thank you for the testing/explanation.  I will pass on the umask 
suggestion/info to the systems team to see how they feel about changing it.

As far as I know, this machine is not dual-bootable.  But I am admittedly a bit 
in the dark about that aspect.

Much appreciated,
-joe

From: De DBA [mailto:dedba@xxxxxxxxxx]
Sent: Saturday, July 12, 2014 7:26 PM
To: Sweetser, Joe
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: OT: Linux df question

Joe,

Is this a dual-boot machine with Windows? Why would the /boot and /boot/efi 
partitions be formatted with VFAT instead of the usual ext4?
On 12/07/14 01:12, Sweetser, Joe wrote:

UUID=6fede090-8fff-40d8-9066-fcf9d6a67680 /                       ext4    
defaults        1 1

UUID=F9A5-364C          /boot                   vfat    
umask=0077,shortname=winnt 0 0

UUID=F9A2-0016          /boot/efi               vfat    
umask=0077,shortname=winnt 0 0

I can now reproduce the issue by formatting 2 partitions with FAT file systems 
and mounting one on  top of the other with your mount options:

[root@emperor /]# mount -o umask=0077,shortname=winnt /dev/dm-3 /fattest
[root@emperor /]# mount -o umask=0077,shortname=winnt /dev/dm-4 
/fattest/fat2test

[root@emperor /]# mount
/dev/mapper/vg_skerchi_sys-LVRoot1 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/vg_skerchi_sys-LVHome1 on /home type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/mapper/vg_skerchi_sys-LVtest1 on /fattest type vfat 
(rw,umask=0077,shortname=winnt)
/dev/mapper/vg_skerchi_sys-LVtest2 on /fattest/fat2test type vfat 
(rw,umask=0077,shortname=winnt)

[root@emperor /]# df -h
Filesystem                          Size  Used Avail Use% Mounted on
...
/dev/mapper/vg_skerchi_sys-LVtest1  8.0M  4.0K  8.0M   1% /fattest
/dev/mapper/vg_skerchi_sys-LVtest2  248M  4.0K  248M   1% /fattest/fat2test

[user@emperor ~]$ df -h
df: `/fattest/fat2test': Permission denied
Filesystem                          Size  Used Avail Use% Mounted on
/dev/mapper/vg_skerchi_sys-LVRoot1  7.9G  2.8G  4.8G  37% /
tmpfs                               372M  228K  371M   1% /dev/shm
/dev/sda1                           485M   35M  426M   8% /boot
/dev/mapper/vg_skerchi_sys-LVHome1 1008M  104M  854M  11% /home
/dev/mapper/vg_skerchi_sys-LVtest1  8.0M  4.0K  8.0M   1% /fattest

If the mountflags on both vfat partitions are set to umask=0022 (drwxr-xr-x) or 
umask=0066 (drwx--x--x) the error goes away. If the umask is 0066, the 
directory cannot be listed by ordinary users, so perhaps that can pass the 
security requirements for your organisation...

Cheers,
Tony
Confidentiality Note: This message contains information that may be 
confidential and/or privileged. If you are not the intended recipient, you 
should not use, copy, disclose, distribute or take any action based on this 
message. If you have received this message in error, please advise the sender 
immediately by reply email and delete this message. Although ICAT, Underwriters 
at Lloyd's, Syndicate 4242, scans e-mail and attachments for viruses, it does 
not guarantee that either are virus-free and accepts no liability for any 
damage sustained as a result of viruses. Thank you.

Other related posts: