LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   chmod of /var/www/html (https://www.linuxquestions.org/questions/linux-security-4/chmod-of-var-www-html-38501/)

alTereD 12-16-2002 08:33 AM

chmod of /var/www/html
 
Hi,
What is the best chmod for a web server folder?
I want to be able to update page via ftp (i need permission to overwrite file as root and as an user).


Thx alot

indi 12-16-2002 02:43 PM

i can suggest

chown -R root.apache /home/www.html

find /home/www/html -type f -exec chmod 664 {} \;
find /home/www/html -type d -exec chmod 2775 {} \;

---

putting g+s will make any new file with apache as group.

---

now add your editors / webmasters in apache group.

make sure FTP creates 664 (file) and 775 (directory) by default.

I will suggest to use secure copy or WinSCP in place of FTP.


All times are GMT -5. The time now is 06:23 PM.