looks like open() is checking permissions of the mount point rather then permissions of the mounted filesystem. Fix: rewrite kernel code workaround: as root: $ umount /sd1;chmod 755 /sd1 one can use open() + fchdir() instead of getcwd(), but this is not a fix anyway the bug is present in all bsd 2.1.x and 2.2.x (including the latest STABLE) How-To-Repeat: as root: $ mkdir /sd1 $ chmod 700 /sd1 $ ls -lad /sd1 drwx------ 2 root wheel 512 Oct 2 19:39 /sd1 $ mount /dev/sd1a /sd1 OR $ mount some_host:/exported_fs /sd1 $ ls -ld /sd1 drwxr-xr-x 46 1064 1685 1024 Jan 12 1998 /sd1 as a normal user: $ cd /sd1 $ ls -la .. ls: ..: Permission denied $ cd .. $ ls -la total 2733 drwxr-xr-x 18 root wheel 512 2 ÏËÔ 19:39 . drwxr-xr-x 18 root wheel 512 2 ÏËÔ 19:39 .. -rw-r--r-- 2 root wheel 356 21 ÏËÔ 1997 .cshrc [...] as a result getwd() and getcwd() in /sd1 fails as they do opendir() (which calls open()).
Responsible Changed From-To: gnats-admin->freebsd-bugs Misfiled PR.
State Changed From-To: open->closed Duplicate of kern/8180.