> -----Original Message-----
> From: lists [mailto:[EMAIL PROTECTED] 
> Sent: Donnerstag, 9. Februar 2006 20:06
> To: Apache List
> Subject: [EMAIL PROTECTED] Setting proper permissions on the web 
> directories
> 
> Hi there - I have been searching a bit (google and the list 
> archives - went back as far
> as 2004) for the "recommended" permissions for a web 
> directory with apache. I always
> seem to have a problem with incorrect permissions on my hobby 
> box (stuff owned by the
> incorrect user, default permissions when a new file is 
> created, etc). How are other
> people getting around this?

When apache accesses files, it does so with the identity of the user defined by 
the "User" directive. Most people create a user (eg, "apache" or "web" or 
something) just for this.

If your files are owned by someone else (eg, "fred") then, depending on 
permissions, apache may or may not have trouble. The default Unix umask os 022 
which means that plain files have mode 644 (write only by owner, read by 
anyone). If all the server does is serve these files (ie, read) then you should 
have no problems. If it tries to modify the files (ie, write), it probably 
can't. If it needs to make new files, it needs write permission in the 
directory. If the files are executable, you need the "x" bit set (eg mode 755). 
And so on...

One simple fix might be to run apache as the user who owns the files and dirs 
(eg, "User fred"). But most people don't like giving a webserver a free hand in 
their personal space. 

Alternatively, make the apache user part of the same group  as fred (do "man 
usermod" to see how). Then set the content directories to be group writeable 
("chmod -R g+w dirname" will recursively descend the directory and make 
everything group writeable).

Or, do it the other way round - change the ownership of all the files to apache 
and don't let fred edit them (su - apache if you need to edit).

There are lots of ways to set up and the method you choose depends on what you 
want to do (read only?, modify?, create?) and how many other users you want to 
access the files. Learn "ls -l"... you will be typing it a lot.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 



> 
> Sticky bits? Other ways?
> 
> 
> 
> Sorry for the noob question.
> 
> d
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>    "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
Diese E-mail ist eine private und persönliche Kommunikation. Sie hat keinen 
Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This e-mail is of a 
private and personal nature. It is not related to the exchange or business 
activities of the SWX Group. Le présent e-mail est un message privé et 
personnel, sans rapport avec l'activité boursière du Groupe SWX.
 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. No confidentiality or privilege 
is waived or lost by any mistransmission. If you receive this message in error, 
please notify the sender urgently and then immediately delete the message and 
any copies of it from your system. Please also immediately destroy any 
hardcopies of the message. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. The sender's company reserves the right to monitor all e-mail 
communications through their networks. Any views expressed in this message are 
those of the individual sender, except where the message states otherwise and 
the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to