View previous topic :: View next topic |
Author |
Message |
Hexorg Tux's lil' helper
Joined: 29 Oct 2009 Posts: 116
|
Posted: Sun May 30, 2010 12:00 am Post subject: User-rights O_o |
|
|
Hey everyone... I thought I had this topic nailed... but apparently not...
I have a single-user machine. I run it as user "hexorg". I have apache on that machine. Apache's document dir is /var/www/localhost/htdocs
Code: | mda_srv / # ls -la /var/www/localhost/htdocs/
total 20
drwxrw-rw- 4 apache apache 4096 May 29 17:26 .
drwxrw-rw- 6 apache apache 4096 May 13 19:43 ..
drwxrw-rw- 2 apache apache 4096 May 29 18:25 cam1
-rwxrw-rw- 1 apache apache 189 May 13 20:50 index.php
drwxrw-rw- 3 apache apache 4096 May 14 00:15 phpmp
|
then I do "usermod -aG apache hexorg". Then I log in as hexorg, but I can not do anything in htdocs - not even cd in it. Why? |
|
Back to top |
|
|
wthrowe Tux's lil' helper
Joined: 19 Aug 2009 Posts: 141
|
Posted: Sun May 30, 2010 1:19 am Post subject: |
|
|
You need execute bits on the directory.
The read bit on a directory just controls getting a directory listing. Things like access to file info and cd'ing are controlled by the execute bit. |
|
Back to top |
|
|
Hexorg Tux's lil' helper
Joined: 29 Oct 2009 Posts: 116
|
Posted: Sun May 30, 2010 2:43 am Post subject: |
|
|
Oh! ok. Thank you, I thought I needed only read bit |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23062
|
Posted: Sun May 30, 2010 3:20 am Post subject: |
|
|
The read bit will let you getdents. You need execute to search the directory. |
|
Back to top |
|
|
|