Why is Permission Denied as root? (apache2)
Linode
Linode Staff
whenever I try to execute commands on my server I am getting this error:
root@xxxx:/etc/apache2/sites-enabled# sudo a2ensite default-ssl
sudo: unable to execute /usr/sbin/a2ensite: Permission denied
Even when I am root, this happens. Why?
1 Reply
whenever I try to execute commands on my server I am getting this error:
root@xxxx:/etc/apache2/sites-enabled# sudo a2ensite default-ssl sudo: unable to execute /usr/sbin/a2ensite: Permission denied
Even when I am root, this happens. Why?
Check the permissions on /usr/sbin/a2ensite:
ls -l /usr/sbin/a2ensite
and make sure the file permissions are set properly…in particular that the executable bit is set in all three groups:
-rwxr-xr-x
If the permissions aren't set like I showed, change them with:
sudo chmod 0755 /usr/sbin/a2ensite
-- sw