View Full Version : public_html group and privilege
Reyner
05-03-2004, 04:53 AM
Hello DA,
Everytime we create an account, the public_html privilege does not seem to be correct and is not writable for public. It is also assigned to 'apache' group.
Any solution?
Thank you,
Reyner
hostanet
05-03-2004, 05:09 AM
Same problem here since the last update.
DirectAdmin Support
05-05-2004, 11:50 AM
Hello,
We've intentionally assigned the group to be apache for security reasons. This allows the public_html directory to have fewer read permissions so other people can't read each other's files. A few reelases ago the public_html was chmod 710, which was incorrect. The most recent version of DA will crerate it as 750 (user:apache) which should work.
If that drives you nuts and you want to change it :), then you can create the following script *exactly* as shown here (no replacements):
/usr/local/directadmin/scripts/custom/domain_create_post.sh
#!/bin/sh
WEB_PATH=~${username}/domains/${domain}/public_html
chown ${username}:${username} $WEB_PATH
chmod 755 $WEB_PATH
exit 0;Then run:
chmod 755 /usr/local/directadmin/scripts/custom/domain_create_post.sh
John
Reyner
05-05-2004, 01:01 PM
Awesome! Thank you very much John :)
Thats great for the experienced, but for the newbie, how would one perfom that action. I would love to be able to have the public_html folder user/user instead of user/apache server wide. If I would have to do it domain by domain thats ok also as there are only 20 domains here at this time so it would be easy. If someone could lay out a step by step for this procedure. I do have PuTTy and have root control not sure of the procedure for PuTTy either but would learn if shown. Even if someone would walk Me thru it over the phone, that would be a help. I have an 800 number to make it easier. Please help this Newbie gain the knowledge.
Thanx,
Nuts:)
Hello.
I have tried this script :
#!/bin/sh
WEB_PATH=~${graphiks}/domains/${graphiks.net}/public_html
chown ${graphiks}:${graphiks} $WEB_PATH
chmod 755 $WEB_PATH
exit 0;
But, when i create a directory or a file, there are still as apache/apache.
is there somthing whrong with the script?
I reloaded apache, créated a directory via php, but, still is apache user and owner.
Thx for any help. Driving me mad this apache owner stuff :)
jmstacey
01-10-2005, 09:22 PM
You did follow John's instructions, putting the code in the
/usr/local/directadmin/scripts/custom/domain_create_post.sh
file and then running the command given above? Not just executing the script on the command line ;)
Well, there whas no file calld domain_create_post.sh, si, i created it.
Then, via ssh using root, i copy/pasted this :
chmod 755 /usr/local/directadmin/scripts/custom/domain_create_post.sh
Sky
Chrysalis
03-18-2005, 06:38 AM
you realised the user:apache change breaks cgi functionality and cause suexec errors. I will also be changing it back to user:user
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.