Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jan 2001 13:11:57 GMT
From:      Salvo Bartolotta <bartequi@inwind.it>
To:        freebsd-doc@freebsd.org
Subject:   Handbook, Chapter 3.2 (Unix permissions), and chmod(1)  -- a suggestion
Message-ID:  <20010121.13115700@bartequi.ottodomain.org>

index | next in thread | raw e-mail

Dear FreeBSD doc'ers,

The description of the Unix directory permissions in this section
might be a little confusing:

<blockquote>
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.                    ^^^^^^^^^^^^^^^^^^^
</blockquote>                      ^^^^^^^^^^^^^^^^^^^


The following examples may illustrate my (little) point.


235 1:12pm ~ >====> mkdir foo
236 1:12pm ~ >====> cd foo
237 1:12pm ~/foo >====> mkdir bar
238 1:12pm ~/foo >====> chmod 100 bar  #make it searchable into by owner
239 1:13pm ~/foo >====> ls bar
ls: bar: Permission denied             #can't list!


240 1:13pm ~/foo >====> chmod 400 bar  #permission for listing
241 1:13pm ~/foo >====> ls bar
242 1:13pm ~/foo >====>                #no complaints


242 1:14pm ~/foo >====> chmod 100 bar
243 1:14pm ~/foo >====> cd bar         #can cd
244 1:14pm ~/foo/bar >====>


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

<suggestion>
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.
</suggestion>

Best regards,
Salvo





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010121.13115700>