kern/159077: Can't cd .. with latest zfs version

Gary Palmer gpalmer at freebsd.org
Mon Jul 25 16:30:24 UTC 2011


The following reply was made to PR kern/159077; it has been noted by GNATS.

From: Gary Palmer <gpalmer at freebsd.org>
To: Michael Haro <mharo at FreeBSD.org>
Cc: FreeBSD-gnats-submit at FreeBSD.org
Subject: Re: kern/159077: Can't cd .. with latest zfs version
Date: Mon, 25 Jul 2011 12:25:34 -0400

 On Wed, Jul 20, 2011 at 11:37:21PM -0700, Michael Haro wrote:
 > 
 > >Number:         159077
 > >Category:       kern
 > >Synopsis:       Can't cd .. with latest zfs version
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    freebsd-bugs
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Thu Jul 21 07:10:07 UTC 2011
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Michael Haro
 > >Release:        FreeBSD 8.2-STABLE amd64
 > >Organization:
 > >Environment:
 > System: FreeBSD backups.mtv.bitsurf.net 8.2-STABLE FreeBSD 8.2-STABLE #1: Sat Jul 16 19:26:28 PDT 2011 root at backups.mtv.bitsurf.net:/usr/obj/usr/src/sys/KERNEL amd64
 > 
 > 
 > freebsd 8.2 stable as of july 16th
 > zpool version 28
 > zfs version 3
 > 
 > >Description:
 > 
 > trying to cd up one level using 'cd ..' gives permission denied
 > 	
 > >How-To-Repeat:
 > 
 > use sh or tcsh, not bash...
 > 
 > $ pwd
 > /home/mharo
 > $ cd ..
 > cd: can't cd to ..
 > $ ls -ald /home
 > drwxr-xr-x  4 root  wheel  4 Nov 29  2009 /home
 > $ ls -ald /home/mharo
 > drwxr-xr-x  3 mharo  users  15 Jul 20 22:49 /home/mharo
 > $ cd /home
 > $ pwd
 > /home
 > $ ls -ald mharo
 > drwxr-xr-x  3 mharo  users  15 Jul 20 22:49 mharo
 > $ cd mharo
 > $ cd ..
 > cd: can't cd to ..
 > 
 > so obviously I can cd into /home, just not via ..
 > 
 > $ zfs list -r zroot/home
 > NAME               USED  AVAIL  REFER  MOUNTPOINT
 > zroot/home         162K  2.70G    26K  /home
 > zroot/home/mharo   119K  2.70G  35.5K  /home/mharo
 
 It may be worth unmounting /home/mharo and checking the permissions
 of the directory underneath the mount point.  e.g.
 
 % mkdir /tmp/159077
 % chmod 0 /tmp/159077
 % ls -la /tmp/159077
 total 274
 d---------   2 root  wheel     512 Jul 25 17:22 .
 drwxrwxrwt  57 root  wheel  249344 Jul 25 17:22 ..
 % mount /dev/md0 /tmp/159077
 % ls -la /tmp/159077
 total 276
 drwxr-xr-x   3 root  wheel        512 Jul 25 17:21 .
 drwxrwxrwt  57 root  wheel     249344 Jul 25 17:22 ..
 drwxrwxr-x   2 root  operator     512 Jul 25 17:21 .snap
 %
 
 and then as a regular user:
 
 $ cd /tmp/159077/
 $ pwd
 /tmp/159077
 $ ls -la
 ls: ..: Permission denied
 total 4
 drwxr-xr-x  3 root  wheel     512 Jul 25 17:21 .
 drwxrwxr-x  2 root  operator  512 Jul 25 17:21 .snap
 $ ls -la ..
 ls: ..: Permission denied
 $ cd ..
 cd: can't cd to ..
 $ 
 
 Regards
 
 Gary


More information about the freebsd-fs mailing list