Re: permissions not honoured by /bin/pwd aka getcwd

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Fri Feb 25 2000 - 03:00:19 EST


In <200002241840.NAA32351@foobar.resnet.gatech.edu> buddy@dookie.net (buddy@dookie.net) wrote:
>> On Thu, 24 Feb 2000, Harald Kirsch wrote:
>>
> <snip>
>>
>> Script started on Thu Feb 24 09:07:10 2000
>> $ pwd
>> /tmp
>> $ mkdir foo
>> $ mkdir foo/bat
>> $ ls
>> foo typescript
>> $ ls foo/*
>> $ cd foo
>> $ ls
>> bat
>> $ cd ..
>> $ ls
>> foo typescript
>> $ chmod 0 foo
>> $ ls
>> foo typescript
>> $ cd foo
>> bash: foo: Permission denied
>> $ ls foo/*
>> ls: foo/*: Permission denied

> Remember, directory permissions are NOT recursive. In this example,
> cd foo/bat

> will still work.

Of course it will not.

> you need to chmod -R if that's what you want to do :)

It depends from what you REALLY want to do :-) If you want to cd in foo/bat
you need eXecute permissions for foo and bat. If you want ls foo/bat then
Read permissions for bat are mandatory but foo can have only eXecute
permissions. 0 means "no permissions at all".

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:11 EST