: /var and /var/www permissions The mode for both these directories is 755. I'd like to restrict permissions to 754. But if I do so, I'm thinking the apache www-data instance won't be able to
The mode for both these directories is 755. I'd like to restrict permissions to 754. But if I do so, I'm thinking the apache www-data instance won't be able to access the directories to serve the contained files.
Is there a canonical mode for these directories. 2. What's a good way to provide the apache instance access: through creating some sort of group?
More posts by @Speyer207
1 Comments
Sorted by latest first Latest Oldest Best
Do not change the chmod for /varas this should remain default.
Apache runs on the usergroup www-data so /var/www should have the owner has www-data and not root, if this is the case then 754 is absolutely fine.
This may help:
chown www-data:www-data /var/www
chmod -R 754 /var/www
Normally this is set-up for you if you used an installer such as apt-get when installing Apache or nginx.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.