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

Re: Directory and file permissions



2010-12-08 13:17, Lisi skrev:
My google foo seems to have deserted me completely.  Could someone take
pity? :-(

I will try my best guess:

On our webserver-space it is quite common to leave directories without read access, to prevent visitors from obtaining directory listings.

The files in those directories can be obtained by following links containing the pathname of the file.

Test:
------------------------------------------
johan@johan-laptop:~$ mkdir test
johan@johan-laptop:~$ touch test/tt
johan@johan-laptop:~$ echo TT >> test/tt
johan@johan-laptop:~$ chmod u-r test
johan@johan-laptop:~$ ls test
ls: kan inte öppna katalog test: Åtkomst nekas
johan@johan-laptop:~$ env LC_ALL="C" ls test
ls: cannot open directory test: Permission denied
johan@johan-laptop:~$ cat test/tt
TT
------------------------------------------
(LC_ALL included to get error message in english)




Hope it helps

/ johan


Reply to: