[plug] Unix file permission problem (I think)

Steve Boak sboak at westnet.com.au
Thu Jul 7 23:21:44 WST 2005


On Thu, 7 Jul 2005 10:52 pm, Bernard Blackham wrote:

[...]

>
> Did you cd into the directory before mounting it? If so, then your
> shell will actually be in the old directory (which presumably has
> permissions that won't allow that) and you need to cd again :
>
> b at amidala:~$ cd /mnt
> b at amidala:/mnt$ ls -ld .
> drwxr-xr-x  3 root root 72 Mar 30 15:01 .
> b at amidala:/mnt$ mkdir this
> mkdir: cannot create directory `this': Permission denied
> b at amidala:/mnt$ ls -ld /space
> drwsrwsr-x  2 b b 48 Nov 24  2004 /space
> b at amidala:/mnt$ sudo mount --bind /space /mnt
> b at amidala:/mnt$ ls -ld .
> drwxr-xr-x  3 root root 72 Mar 30 15:01 .
> b at amidala:/mnt$ ls -ld /mnt
> drwsrwsr-x  2 b b 48 Nov 24  2004 /mnt
> b at amidala:/mnt$ mkdir this
> mkdir: cannot create directory `this': Permission denied
> b at amidala:/mnt$ cd /mnt
> b at amidala:/mnt$ mkdir this
> b at amidala:/mnt$ cd /
>
> Otherwise, I'm baffled for the time being...
>
> Bernard.

I think you are on the right track Bernard, although I'm not sure I understand 
why. The underlying mount point has the group write bit CLEARED, but the 
partition mounted on top of it is read/write in fstab. Do the write 
permissions of the mount point affect the permissions of the filesystem 
mounted on it?

min:/# umount /dev/hda8
min:/# ls -ld /var/share/download
drwxr-xr-x  2 root root 4096 Jun 30 06:20 /var/share/download

min:/# mount /var/share/download/
min:/# ls -ld /var/share/download
drwxrwxr-x  3 root share 4096 Jul  7 21:56 /var/share/download

Steve





More information about the plug mailing list