Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Whoops... messed up home directory permissions



On 20/04/06, Joe Larabell <larabell@???> wrote:

> On a directory, the 'x' bit allows you to 'cd' to the directory.

Well, slightly more than that. The 'x' bit controls access to files in
the directory. For example:

: jmglov@example.com; mkdir test
: jmglov@example.com; echo 'Can you hear me now? Good.' >test/foo
: jmglov@example.com; cat test/foo
Can you hear me now? Good.
: jmglov@example.com; ls -l test/foo
-rw-rw----  1 jmglov jmglov 27 Apr 20 17:29 test/foo
: jmglov@example.com; ls -ld test/
drwxrwx---  2 jmglov jmglov 16 Apr 20 17:29 test/
: jmglov@example.com; chmod 640 test
: jmglov@example.com; ls -ld test/
drw-r-----  2 jmglov jmglov 16 Apr 20 17:29 test/
: jmglov@example.com; ls -l test/foo
ls: test/foo: Permission denied
: jmglov@example.com; cat test/foo
cat: test/foo: Permission denied
: jmglov@example.com; rm -rf test/
rm: cannot chdir from `.' to `test/': Permission denied
: jmglov@example.com; chmod 750 test/
: jmglov@example.com; rm -rf test/

See what I mean?

-Josh

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links