[solved] ownership permissions problems?

Status
Not open for further replies.
#1
ownership permissions problems? Litespeed cannot create directories or modify files

Ever since I installed Litespeed, to add a domain I had to manually create the directories in which the folders would reside. Litespeed was unable to create them but would not say why.

Is this normal?

Today I needed to instantiate a vhost and I could not, because the config directory needed to be created, as well as an xml file. So I created the config directory manually and also the xml file. Now Litespeed is giving me this error:

failed to save to file /home/user/public_html/example.com//config/file.xml
Are there some permissions / ownership issues going on here?

The public_html dir and its contents are all owned by user:user

Please help.
 
Last edited by a moderator:

mistwang

LiteSpeed Staff
#2
everything follow OS file system permissions, you need to use appropriate user/group and permission for your setup.
Just remember that web console is running as lsadm:lsadm, lshttpd run as nobody:nobody or the user/group you set during installation.
 
Last edited by a moderator:
#3
Thank you so much for your reply.

How can I check what user/group I set during installation? I do not remember if I changed it or not.

Also, I tried setting the permissions on the XML file to lsadm:lsadm and it did not help. Do I need to set permissions and ownership on the containing dirs to lsadm:lsadm as well?

If so how far down do I need to go? just to public_html? My dir structure is /home/user/public_html/example.com/public/ etc.
 
Last edited by a moderator:

NiteWave

Administrator
#4
in one of test machine:
Code:
#groups lsadm
lsadm : lsadm nobody
so lsadm is in nobody group.

in your case, /home/user/public_html/example.com/config/file.xml

I think only config and file.xml need owned by lsadm, other parent directories can be owned by other users as long as their permission is like 755 which permit user lsadm to reach the final file.xml.
 
Last edited by a moderator:
#5
Thank you !

Changing the ownership of config and the xml file to lsadm:lsadm solved this problem.

Much obliged.
 
Last edited by a moderator:
#6
The below solved my problem

Code:
username: username1
domain name: domain.xyz.com
Code:
> sudo usermod -aG nogroup username1
> sudo chown -R nobody:nogroup /home/alldomains/domain.xyz.com/public_html
> sudo chmod -R 770 /home/alldomains/domain.xyz.com/public_html
 
Last edited by a moderator:
Status
Not open for further replies.
Top