Find the answer to your Linux question:
Results 1 to 5 of 5
for srv/www/htdocs, what should be the user and permissions for these folders? I have access locally and over the local network. I have created user named after my XP laptop ...
  1. #1
    Just Joined! roger's Avatar
    Join Date
    Feb 2005
    Posts
    28

    Apache server folder permissions

    for srv/www/htdocs, what should be the user and permissions for these folders?

    I have access locally and over the local network. I have created user named after my XP laptop on the linux PC, do I use that or just set everything to 'USERS' to allow anyone in?

    So I suppose I need to know which user: root/users/specific user AND 777 or something else? AND should it be from srv downwards or from www?

    Thanks

  2. #2
    Linux Newbie
    Join Date
    May 2006
    Location
    Kansas
    Posts
    187
    Quote Originally Posted by roger
    for srv/www/htdocs, what should be the user and permissions for these folders?

    I have access locally and over the local network. I have created user named after my XP laptop on the linux PC, do I use that or just set everything to 'USERS' to allow anyone in?

    So I suppose I need to know which user: root/users/specific user AND 777 or something else? AND should it be from srv downwards or from www?

    Thanks
    You really want to restrict write permissions in your directory if you can for the world. I'd suggest using 755 permissions instead of 777.

  3. #3
    Just Joined! roger's Avatar
    Join Date
    Feb 2005
    Posts
    28

    Thanks, but

    I will check that, but what I was asking:

    1. If I set permissions for a folder do these travel down to the lower folders?

    2. If I set "apply these settings to eclosed files does this affect enclosed folders as well?

    Thanks

  4. #4
    Linux Newbie
    Join Date
    May 2006
    Location
    Kansas
    Posts
    187
    It sounds like you are doing the chmod in a GUI. If you do the chmod on a command line, it will recursively change the permissions with a "-R":

    cd /srv/www
    chmod -R 755 ./htdocs

  5. #5
    Just Joined!
    Join Date
    Jan 2007
    Location
    Germany
    Posts
    73
    Quote Originally Posted by roger
    1. If I set permissions for a folder do these travel down to the lower folders?
    No, You have to use option -R in chmod (-R="Recursive")

    2.Regarding permissions of "/srv" or "www"--you must make readable /srv at least readable.

    Recall that under Apache for local users login:group= "YourLogin:users", but external users have login:group="www:wwwrun".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...