Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jan 1999 16:16:45 +0300
From:      Alexander Bezroutchko <abb@zenon.net>
To:        hackers@FreeBSD.ORG
Subject:   problem with permission at mount point again.
Message-ID:  <369F3FBD.ED99E422@zenon.net>

next in thread | raw e-mail | index | archive | help
I have a problem with permission at mount point.

2.2.7-STABLE behaves as described in thread titled 'permission confusion
at mount point' (freebsd-hackers, July 1998) and the CAVEATS section of
mount(8), it's bad for me (I have to shutdown running server), but
understandable:

-- mount(8) -----------------------
...
CAVEATS
     After a successful mount, the permissions on the original mount
point de-
     termine if .. is accessible from the mounted file system.  The
minimum
                                                               
^^^^^^^^^^^
     permissions for the mount point for traversal across the mount
point in
    
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     both directions to be possible for all users is 0111 (execute for
all).
                                                  ^^^^^^^
...
-----------------------------------

But 3.0-RELEASE (i386), doesn't satisfy this description.

As root:

1 root@abb:/var# /bin/pwd
2 /var
3 root@abb:/var# ls -ld /var/ch
4 drwx------  2 root  wheel  512 15 Jan 10:53 /var/ch
5 root@abb:/var# mount /dev/wd2a /var/ch
6 root@abb:/var# ls -ld /var/ch
7 drwxr-xr-x  2 root  wheel  512 15 Jan 14:03 /var/ch
8 root@abb:/var#

As ordinary user:

10 abb@abb:~> cd /var/ch
11 abb@abb:/var/ch> ls -ld ..
12 ls: ..: Permission denied
13 abb@abb:/var/ch> /bin/pwd
14 /var/ch
15 abb@abb:/var/ch> cd ..
16 abb@abb:/var> /bin/pwd
17 /var
18 abb@abb:/var>

As far as I understand, in compliance with manpage commands 13 & 15 must
return 'Permission denied'. Behaviour described in the thread was
claimed
as correct and only possible. So why pwd and cd succeeds but ls fails ?

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?369F3FBD.ED99E422>