I am currently experiencing something weird where apache has to have execution permission in order to display pages. This is the permissions currently set on the directory where admin has all permissions and apache only has read permission. Nevertheless I am having a 403 when trying to access the index.
Am I missing something? I thought that only read permission was needed for apache to be able to display pages?
drwxr----- 3 admin www-data 4096 Apr 4 12:27 assets
drwxr----- 3 admin www-data 4096 Apr 4 12:27 css
drwxr----- 3 admin www-data 4096 Apr 4 12:27 images
-rwxr----- 1 admin www-data 469 Apr 4 12:27 index.php
drwxr----- 15 admin www-data 4096 Apr 4 12:27 protected
drwxr----- 4 admin www-data 4096 Apr 4 12:27 themes
The virtualhost is as follow:
NameVirtualHost *:443
<VirtualHost *:443>
ServerName ****
ServerAlias ****
SSLEngine On
SSLCertificateFile ****
SSLCertificateKeyFile ****
DocumentRoot /home/sites/share
</VirtualHost>
Thanks for your help.
EDIT per request:
Permissions on /home/sites/share
drwxr----- 8 admin www-data 4096 Apr 4 14:52 share
Permissions on /home/sites
drwxr-xr-x 6 admin admin 4096 Apr 4 12:27 sites
Permissions on /home
drwxr-xr-x 4 root root 4096 Apr 2 18:01 home
Best Answer
The share directory needs execute permission for the www-data group. Without execute permission, members of the www-data group (i.e. Apache) can not access the contents of that directory.
Edit: Obviously any other directories Apache needs access to, such as assets/images/etc above, and any subfolders of these will also need execute permission for the group.