My web files are located in /var/www/html/example.com/web/
Permissions are:
drwxr-xr-x 20 root root 4096 Aug 13 18:22 var
... same for www and html ...
drwxr-xr-x 4 root root 4096 Aug 13 18:22 example.com
drwxr-xr-x 10 apache root 4096 Aug 13 18:22 web
I have an FTP user "ftpuser" but I don't want them to be able to access any of the files in /var/www/html/
However, if I try chmod o-rx
on ANY of the parent level folders, it gives a 403 Forbidden error, even though the user Apache still has RX permissions on web.
How can I stop ftpuser from changing into those directories and reading the files, without blocking access from users visiting through a browser?
Note - the strange thing is I have another server setup similarly, where I simply did chmod o-rx
on the example.com folder, and everything remained web accessible.