So my linux box has 2 users :
- root (which I use)
- dev (the user that my developer uses)
I have a few directories on my web server which I need to restrict access from the "dev" user.
So, for example :
/var/www/html/www.mysecuresite.com (dev user should not access)
/var/www/html/www.mysecuresite2.com (dev user should not access)
/var/www/html/www.devsite.com (both root and dev should access)
/var/www/html/www.devsite2.com (both root and dev should access)
..
..
..
Apache is currently running as apache:apache
How do i make sure that apache can run all directories but the dev user cannot access the directories he is not supposed to ? What permissions do I give to the directories, and run apache as so that the above rules are fulfilled ?
Is this technically possible to do by just tinkering with permissions, users and groups ?
Edit: The above folders contain fully dynamic web applications written in PHP, connecting to MySQL, file uploads etc.
There are no groups currently set up on my linux box. I am not a seasoned linux user, so I would really appreciate detailed advice on what would be the best way forward for me.
Thanks !