Skip to contentSkip to conversation

Mount point permissions

DISCUSSION Alvaro Lopes 3 participants 3 messages Dec 22, 2001

lore
Share & tools
lore
#0 lore raw

Hi all

I just created a RAID0-reiserfs filesystem to hold /tmp (I expect to have some increased performance since my rootfs is on a LVM/RAID5 array). The problem (althrough I can easily override it) is whenever the new fs is mounted, all permissions on /tmp are overriden (I double checked on mount options and there seems no option is provided for mountpoint permissions). So what I get is:

dwarf:~# ls -ld /tmp
drwxrwxrwt    8 root     root          336 Dez 22 14:55 /tmp
dwarf:~# mount /dev/RAID0VOL/TEMP /tmp
dwarf:~# ls -ld /tmp
drwxr-xr-x    2 root     root           48 Dez 22 14:45 /tmp

Shouldn't mount preserve original mountpoint permissions ?

Álvaro Lopes

#1 lore raw
Quoted 1 line · Alvaro Lopes

Shouldn't mount preserve original mountpoint permissions ?

No, it shouldn't.

#2 lore raw
In reply to Alvaro Lopes
Quoted 7 lines
dwarf:~# ls -ld /tmp
drwxrwxrwt    8 root     root          336 Dez 22 14:55 /tmp
dwarf:~# mount /dev/RAID0VOL/TEMP /tmp
dwarf:~# ls -ld /tmp
drwxr-xr-x    2 root     root           48 Dez 22 14:45 /tmp

Shouldn't mount preserve original mountpoint permissions ?

It does. If you umount it you will get them back. mount replaced "/tmp" with the root inode of your new volume, hence the change. Fix the root inode of the new fs and all will be happy