File and folder permissions in Centos 5.3

wtfbrb

Verified User
Joined
Oct 11, 2009
Messages
71
I've been struggling with permissions on my new server, it has CentOs 5.3 and DirectAdmin, pretty much a fresh box. Previously I've had it work where it creates userpackage:userpackage groups and users for each package. Well on my new server that didn't work for other php scripts. So I ran this:
Code:
find . -type f -exec chown apache:apache {} \;
find . -type d -exec chown apache:apache {} \;
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

And it fixed it however I don't think it is the most secure way of doing things. I later slipped up and ran it on my /home directory and now I am sure my system is insecure and the DA file manager won't work because it says permissions are wrong.

Any suggestions?

TIA,
Mark
 
Got file manager back for admin

I ran chown -R admin:admin ./admin from home directory and my file manager came back for admin level. However in order to get joomla/drupal to work properly I still have to chown apache:apache ./public_html for all users who use such php scripts. This does disable the file manager for files in public_html for those users, not sure what the fix is as I thought for security reasons I should leave them as da_user:da_user

Any suggestions welcome.
 
Rebuild your server using custombuild and make sure to setup php not as cli, but rather as cgi.

Then run the DirectAdmin script set_permissins.sh.

Then check this thread.

Jeff
 
Back
Top