From owner-freebsd-doc Sat Mar 23 15:32: 2 2002 Delivered-To: freebsd-doc@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 30F2237B430 for ; Sat, 23 Mar 2002 15:30:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2NNU1j15812; Sat, 23 Mar 2002 15:30:01 -0800 (PST) (envelope-from gnats) Received: from aragorn.neomedia.it (aragorn.neomedia.it [195.103.207.6]) by hub.freebsd.org (Postfix) with ESMTP id A027E37B417 for ; Sat, 23 Mar 2002 15:25:55 -0800 (PST) Received: (from httpd@localhost) by aragorn.neomedia.it (8.11.4/8.11.4) id g2NNPmr06810 for FreeBSD-gnats-submit@freebsd.org; Sun, 24 Mar 2002 00:25:48 +0100 (CET) Message-Id: <1016925948.3c9d0efc18ea0@webmail.neomedia.it> Date: Sun, 24 Mar 2002 00:25:48 +0100 (CET) From: Salvo Bartolotta To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/36241: ambiguous description of directory permissions Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 36241 >Category: docs >Synopsis: ambiguous description of directory permissions >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 23 15:30:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Salvo Bartolotta >Release: FreeBSD 4.5-STABLE i386 >Organization: none of importance >Environment: System: FreeBSD 4.5-STABLE #0: Tue Mar 12 18:46:03 CET 2002 >Description: In http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/permissions.html is written:
Directories are also treated as files. They have read, write, and execute permissions. The executable bit for a directory has a slightly different meaning than that of files. When a directory is marked executable, it means it can be searched into, for example, a directory listing can be done in that directory.
This seems inaccurate/ambiguous (to me) for this reason: 213 12:12am ~ >====> ll -d trial d--x------ 3 otto otto 512 Oct 28 02:25 trial 214 12:12am ~ >====> ll trial ls: trial: Permission denied 215 12:12am ~ >====> cd trial 216 12:12am ~/trial >====> 217 12:13am ~/trial >====> ls ls: .: Permission denied That is, the execute permission alone allows one to __cd__ to a directory, rather than list its contents. >How-To-Repeat: Read the handbook. :-) >Fix: IIUC, something along the lines of the following: When a directory is marked executable, it means it can be searched into, i.e. one can cd (change directory) to it. This also means that, in the directory in question, one can access those files whose names one knows, the type of access being related to the permissions on the files. In particular, in order to be able to do a directory listing, one must set the read permission on the directory; in order to delete a file (whose name is known), one must set the write AND execute permissions on the directory containing the file. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message