Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:

  1. User wants to access http://myhost.com/~user
  2. Apache is looking into the config file, sees that the user is valid and can access folder
  3. Checking if user have access to folder via group www-data in the folder: ~/public_html` if ok
  4. 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.

share|improve this question
    
I think the answer to your question is insatisfactory. –  don.joey Aug 12 '13 at 12:24
    
I deleted all posts that wasn't helpful. I agree. There is no simple solution to this challenge other than perhaps the solution from Oliver's website. –  user1988151 Aug 19 '13 at 17:53
add comment

1 Answer

up vote 0 down vote accepted

This may be a solution: http://blog.olivier.coupelon.net/2008/10/apache2-webdav-userdir-based-file.html

It's not a good solution, but it does work.

share|improve this answer
1  
Welcome to Ask Ubuntu! Whilst this may answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  edwin Aug 9 '13 at 21:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.