From owner-freebsd-doc Sun Jan 21 5: 9:43 2001 Delivered-To: freebsd-doc@freebsd.org Received: from relay3.inwind.it (relay3.inwind.it [212.141.53.74]) by hub.freebsd.org (Postfix) with ESMTP id DDD6137B400 for ; Sun, 21 Jan 2001 05:09:25 -0800 (PST) Received: from bartequi.ottodomain.org (62.98.170.139) by relay3.inwind.it (5.1.056) id 3A40BF8600655BC8 for freebsd-doc@freebsd.org; Sun, 21 Jan 2001 14:09:24 +0100 From: Salvo Bartolotta Date: Sun, 21 Jan 2001 13:11:57 GMT Message-ID: <20010121.13115700@bartequi.ottodomain.org> Subject: Handbook, Chapter 3.2 (Unix permissions), and chmod(1) -- a suggestion To: freebsd-doc@freebsd.org X-Mailer: SuperCalifragilis X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Dear FreeBSD doc'ers, The description of the Unix directory permissions in this section might be a little confusing:
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. ^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^ The following examples may illustrate my (little) point. 235 1:12pm ~ >=3D=3D=3D=3D> mkdir foo 236 1:12pm ~ >=3D=3D=3D=3D> cd foo 237 1:12pm ~/foo >=3D=3D=3D=3D> mkdir bar 238 1:12pm ~/foo >=3D=3D=3D=3D> chmod 100 bar #make it searchable into = by owner 239 1:13pm ~/foo >=3D=3D=3D=3D> ls bar ls: bar: Permission denied #can't list! 240 1:13pm ~/foo >=3D=3D=3D=3D> chmod 400 bar #permission for listing 241 1:13pm ~/foo >=3D=3D=3D=3D> ls bar 242 1:13pm ~/foo >=3D=3D=3D=3D> #no complaints 242 1:14pm ~/foo >=3D=3D=3D=3D> chmod 100 bar 243 1:14pm ~/foo >=3D=3D=3D=3D> cd bar #can cd 244 1:14pm ~/foo/bar >=3D=3D=3D=3D> An equivalent description to that quoted above is found in chmod(1). Am I missing something ? If not, you may wish to consider the following The executable bit for a directory has a slightly different meaning than that of files. When a directory is marked executable, it means you can cd, ie "Change Directories", to it. In particular, in order for you to be able to cd to a subdirectory, the parent (sub)directories must have the executable bit set. N.B. a directory with ONLY the executable bit set allows you to perform NO other operations: you can neither list the directory contents nor create/modify/delete its file(s) or subdirectories. Best regards, Salvo To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message