kern/121898: pwd(1)/getcwd(2) fails with Permission denied
Yoshihiro Ota
ota at j.email.ne.jp
Thu Mar 20 06:10:04 UTC 2008
>Number: 121898
>Category: kern
>Synopsis: pwd(1)/getcwd(2) fails with Permission denied
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Mar 20 06:10:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Yoshihiro Ota
>Release: FreeBSD 7.0
>Organization:
>Environment:
FreeBSD XXX 7.0-RELEASE FreeBSD 7.0-RELEASE #407: Mon Feb 25 09:50:08 EST 2008 root at XXX:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Read permissions are give to everyone where it is necessary for a user to do "pwd" but "pwd" fails with permission denied.
I think this also happened in 6.x releases, too.
>How-To-Repeat:
% df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad4s4a 2026030 1859118 4830 100% /
devfs 1 1 0 100% /dev
/dev/ad4s4d 5077038 3678668 992208 79% /usr
/dev/ad4s4e.journal 10154156 8550560 791264 92% /ports
/ports/db/pkg 10154156 8550560 791264 92% /var/db/pkg
/ports/X11R6 10154156 8550560 791264 92% /usr/X11R6
/ports/local 10154156 8550560 791264 92% /usr/local
% cd /usr/local
% pwd
/usr/local
% ls -sld .
2 drwxr-xr-x 35 root wheel 1024 3 10 12:52 .
% ls -lsd share
6 drwxr-xr-x 292 root wheel 6144 3 19 13:12 share
% cd share
% pwd
pwd: .: Permission denied
% cd /ports/local/share/
% pwd
/ports/local/share
% su -l root
$ cd /usr/local/share
$ pwd
/usr/local/share
$ cat /etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/ad4s4b none swap sw 0 0
/dev/ad4s4a / ufs rw 1 1
/dev/ad4s4d /usr ufs rw,noatime 2 2
/dev/ad4s4e.journal /ports ufs rw,noatime 2 2
/ports/db/pkg /var/db/pkg nullfs rw,noatime 0 0
/ports/X11R6 /usr/X11R6 nullfs rw,noatime 0 0
/ports/local /usr/local nullfs rw,noatime 0 0
/ports/compat /usr/compat nullfs rw,noatime 0 0
>Fix:
Unknown.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list