I have been searching for a solution in days now, and I cannot find it. And please understand that I have only been using Linux (Ubuntu) for the last two weeks.
I am using apache with mod pwauth and userdir, and simply want to restrict the auth user >to the home folder WITHOUT creating location-tags in my httpd config file.
If I understand correctly www-data is the group that apache is using to access the files and folders. And the username that the user used to login with, has nothing to do with the files and folders when user is logged in (besides from the httpd file).
What I mean is:
- User wants to access http://myhost.com/~user
- Apache is looking into the config file, sees that the user is valid and can access folder
- Checking if user have access to folder via group www-data in the folder: ~/public_html` if ok
- User have access to the folder
Am I right, or have I completely misunderstood the auth process? I mean. There must be some way to keep the auth user info and use it for the file permissions, so that Apache is using them on the inside of the file system.
Update: I chosed to use another solution instead. I use OpenSSH on the server side, and changed the protocol to SFTP on the client side. Now everything works very good. The administration is also much easier now.