On my ubuntu server file and folders i created as well as stuff I installed
belonged to the ftp user.
As a result i had to be generous with permissions to get my webapps to
work.
I changed the owner and group for these files to www-data which allowed me
to completely
remove permissions for 'other' and 'group'.
Looks like this:
--rw------- 1 www-data www-data 7925 2009-07-20 21:04 index.php
Question 1: Does index.php need execute permissions? It seems to work. . .
I noted that hidden files are still owned by root:
-rw-r--r-- 1 root root 730 2009-07-20 21:04 .htaccess
Question 2: Should I leave it like this or change it to www-data?
Same for most folders in document root:
drwxr-x--- 5 eillo psaserv 1,0K 2009-07-20 21:04 ../
Question 3: Should I change their owner/group to www-data?
Thanks,
Ollie
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!