Hi guys,
I have a couple of production servers with Apache 2.2 and PHP running through mod_php. I've been reading that it's much more secure to use suPHP and that it would prevent my users to have troubles with the owner and permissions of dynamically generated files.
I'm thinking of migrating to suPHP then, and wanted to know what kind of things I should have in mind for the change. Since the servers are in production I would need to make this migration taking all the necessary precautions so that users don't even notice the change.
Here's what I think I should do. Please correct me if I'm wrong and let me know if you have further suggestions/comments/experiences to share.
- Install suPHP using Custombuild
- Change permissions and owners of folders and files (seen here):
Thanks!
I have a couple of production servers with Apache 2.2 and PHP running through mod_php. I've been reading that it's much more secure to use suPHP and that it would prevent my users to have troubles with the owner and permissions of dynamically generated files.
I'm thinking of migrating to suPHP then, and wanted to know what kind of things I should have in mind for the change. Since the servers are in production I would need to make this migration taking all the necessary precautions so that users don't even notice the change.
Here's what I think I should do. Please correct me if I'm wrong and let me know if you have further suggestions/comments/experiences to share.
- Install suPHP using Custombuild
Code:
cd /usr/local/directadmin/custombuild
./build suphp
- Change permissions and owners of folders and files (seen here):
Code:
cd /usr/local/directadmin/scripts && ./set_permissions.sh user_homes
find /home/*/domains/*/public_html -type d -print0 | xargs -0 chmod 711
find /home/*/domains/*/public_html -type f -print0 | xargs -0 chmod 644
cd /usr/local/directadmin/data/users && for i in `ls`; do { chown -R $i:$i /home/$i/domains/*/public_html;}; done;
Thanks!