public_html group and privilege

Reyner

Verified User
Joined
Dec 20, 2003
Messages
63
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
 
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
Code:
#!/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
 
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 :)
 
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
 
you realised the user:apache change breaks cgi functionality and cause suexec errors. I will also be changing it back to user:user
 
Back
Top