Forum Moderators: phranque
User www-data
Group www-data
this is the content of the only sites-available file (sites-available/kristof):
fileserver:~# cat /etc/apache2/sites-available/kristof
<VirtualHost *>
DocumentRoot /data
ServerAdmin me@gmail.com
ErrorLog /var/log/apache2/error_kristof.log
</VirtualHost>
for authentication on the web server i use basic authentcation:
#Basic Authentication
<Directory "/data">
AuthType Basic
AuthName "Fileserver N`Kr1pt"
AuthUserFile /etc/apache2/users.passwd
Require valid-user
</Directory>
in users.passwd there are 2 users specified
now this works great.
the 2 users can login to the webserver en view all content because everything under /data is 755.
everything under /data is owned by user kristof and group root
but i want to take it a little further, for example when kristof logs in to the webserver i want him to view everything that is viewable for him.
so everything that is chmodded 700 for user kristof.
the files are already chmodded 700 for kristof atm but they don't show up because the server runs as user ww-data offcourse and not as user kristof.
is it possible to achieve this without running another apache server?
can you also provide a small example of the config fils that need to be edited if possible?
grtz
i think the only way you can do this is to put all the kristof-owned/700-chmodded files in a /data_kristof directory and provide directory level access to kristof-only (and maybe the other user if it applies).
regardless - they must be web readable so the chmod 700 and/or group ownership will have to change for this to ultimately work.