I've installed fedora 20 in VMware Workstation on Windows 7. Everything goes okay until I install nginx
via yum install nginx
. After editing nginx.conf (only changed location / root)
location / { root /mnt/hgfs/www; index index.html index.htm; }
I try to start nginx via systemctl start nginx
. Nginx is active but can't access to root folder. Log says 13: Permission denied
. I'm sure nginx has the permission to access the folder.
At first, I thought it might because of HGFS. I changed root to /usr/share/nginx/html
, than problem solved. But I won't use this folder as my root.
So I mount a new disk via mount /dev/sdb1 /www
(formatted as ext4), set 777 and change nginx.conf. Then the problem shows again.
The reason why I specify systemctl
is that I try to run nginx just by sudo nginx
. Anything goes perfect and no error shows up.
Does systemctl
have issues with a different filesystem? But sdb1 is the same format as origin filesystem.
What can I do to resolve this?
This is because of SELinux, which uses a different way to manage privileges.