Date: Sat, 5 Jun 2004 14:48:35 +1000 From: Paul Armstrong <army@cyber.com.au> To: Dan Rue <drue@therub.org> Cc: freebsd-hackers@freebsd.org Subject: Re: chmod features: +RW? Message-ID: <20040605044834.GP13012@vanilla.office.cyber.com.au> In-Reply-To: <20040603221454.GA21622@therub.org> References: <20040603221454.GA21622@therub.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 03, 2004 at 05:14:54PM -0500, Dan Rue wrote: > I am interested in a feature addition to chmod for the equivalent of +X > (Add x bit only if it's a dir), except for read and write (R and W?). > > I'm not sure how useful W would be - but R would be quite useful for > allowing the reading and traversing of dirs without giving read > permission to the contents of the dirs. You've got a misunderstanding here. The reason the +X feature is there is for exactly the prupose you propose above: > mkdir -p foo/bar > ls -al foo total 6 drwxr-xr-x 3 army army 512 Jun 4 21:45 . drwxr-xr-x 3 army army 512 Jun 4 21:45 .. drwxr-xr-x 2 army army 512 Jun 4 21:45 bar > chmod 111 foo > ls -al foo ls: foo: Permission denied > cd foo > ls -al . ls: .: Permission denied > ls -al bar total 4 drwxr-xr-x 2 army army 512 Jun 4 21:45 . d--x--x--x 3 army army 512 Jun 4 21:45 .. > chmod 400 bar > cd bar bar: Permission denied. > ls -al bar ls: .: Permission denied ls: ..: Permission denied > chmod 700 . > ls -al . total 6 drwx------ 3 army army 512 Jun 4 21:45 . drwxr-xr-x 3 army army 512 Jun 4 21:45 .. dr-------- 2 army army 512 Jun 4 21:45 bar
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040605044834.GP13012>