Tuesday 15 March 2011

linux - Is it possible to allow a user to access a dir without making him the owner? -


For my desktop machine, I want to be able to get files in my home directory in a browser.

I have set Apache document to my home, but I get the logically forbidden page. I have www-data in my group Attempted to add user, with the same result

I would not want to give full access to any user in my house.

So how should I move Apache to read my home? $ ls -la / home | Grep gael drwxr-xr-x 44 gael gael 4096 mars 17 22:30 gael $ groups www-data; Error log: [176 22: 43: 06.5 9 2819, 2015] [authz_core: error] [www. Data] PID 4572] [Client 127.0.0.1 9 677] AH 01630: Customer Configuration Has Been Denied: / home / gael /

Apache Conf:

  & lt; VirtualHost *: 80 & gt; DocumentRoot / home / gael / & lt; / VirtualHost & gt;  

Make sure the user is running the webserver read All files are required to be viewed

It seems that you have added the www-data user to you, it seems that they have < Code> execute will be required.

Keep in mind that a new group membership is not effective immediately: Interactive users will have to re-enter, a daemon needs to be restarted (thus: restart Apache). The W32 method (simply reboot) will also work.

BTW, exposing your home through a webserver looks like a strong bad idea: Anyone who can use webserver (usually anyone Same net) will be able to see your home directory. Make sure you add additional security (password protection, encryption, ...).

BTW, do you know that ~ / public_html directory traditionally stores your web-browser ~ & lt; User & gt; (So if your login name is "GAIL", then you can access this directory via http: // localhost / ~ gael / ). If the directory does not exist, just create it and make sure that you set your group to www-data to share some data through the web For a more secure way.


No comments:

Post a Comment