I am trying to give a SFTP user (user2) writeable access to a virtual host directory (website) in /var/www/mywebsite under Ubuntu 12.04. I have setup sshd_config to use Chrooting so that this user (user2) can only access this website directory.
Here are my problems:
- SFTP user (user2) does not have write permission to this directory
- SuPHP is enabled and the website only runs when the user:group is user1:user1
- If I change the user:group to anything else, the PHP scripts don't work
- If I leave things as they are, the SFTP user (user2) cannot write or edit any files in the directory
I want this user to access this directory only and write/edit files. I need SuPHP to continue working as it is. I also don't remember how or why SuPHP is setup to work with user1:user1 only ... I can't find anywhere that I set this configuration but maybe I'm missing/forgetting something.
What can I do? Is what I'm trying to do possible?