vendredi 30 janvier 2015

Proper create user account with permissions on CentOS/Apache


I have setup a CentOS VPS to run apache, I am having trouble with permissions when creating an account.


I have setup a virtual host host to point a domain to /home/user/public_html



<VirtualHost *:80>
ServerAdmin me@mydomain.com
DocumentRoot /home/user/public_html
ServerName www.user.com
ServerAlias user.com
</VirtualHost>


I then added a user and make the public dir:



adduser user
passwd user
mkdir /home/user/public_html


Now when I browse this domain I get permission denied.. I can login via SSH and browse to the public directory but it does not let me create files due to permission errors.


The permission on the user dir are is 700, when i change it to 755 I get the 'Apache is installed' page, which I find weird.


I've Google'd this problem and it looks to be widespread, SELinux crops up a lot, however upon testing it is already disabled on my server:



SELinux status: disabled


Aucun commentaire:

Enregistrer un commentaire