Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1630  / 3 Years ago, thu, may 13, 2021, 8:33:35

I need to be able to restrict a secondary user that I'm creating from even viewing /var/www as it contains some sensitive information in its PHP files.



Currently, the user is able to view the files (but not modify them). How can I prevent them from even viewing the files without disallowing my web server (apache) from being able to read and execute them?


More From » permissions

 Answers
4

You may want to use Access Control Lists. They are a more advanced way of handling permissions than the default way. For example, in your case you can use:



setfacl -R -m u:username:--- /var/www


More about:




[#29642] Saturday, May 15, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
anoalk

Total Points: 271
Total Questions: 90
Total Answers: 112

Location: Zambia
Member since Wed, Dec 16, 2020
3 Years ago
anoalk questions
Wed, Mar 15, 23, 04:06, 1 Year ago
Fri, Sep 24, 21, 02:59, 3 Years ago
Sat, Mar 5, 22, 02:33, 2 Years ago
Tue, Mar 22, 22, 07:19, 2 Years ago
;