I'm attempting to setup SFTP (OpenSSH 6.1 internal-sftp) so that a group of users(sftpusers) can access my server specifically to work on development of my website:
Match Group sftpusers Chrootdirectory /srv/sftp/shared AllowTCPForwarding no X11Forwarding no ForceCommand internal-sftp
I have created the chroot (/srv/sftp/shared) owned by root. Apache virtual directories are pointing to folders in /srv/sftp/shared/www. This folder is owned by www-data as expected:
drwxrwxr-x 5 www-data www-data 4096 Oct 13 20:39 /srv/sftp/shared/www drwxr-x--- 3 root sftpusers 4096 Oct 13 19:41 /srv/sftp/shared
Apache error is:
[Sun Oct 13 22:04:15 2013] [crit] [client 18.104.22.168] (13)Permission denied: /srv/sftp/shared/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable Verified virtual directories are set to shared/www, not shared
I am able to access all of these files via SFTP. My problem is that when attempting to access my sites from a web browser now I'm getting "Permission Denied" errors which I assume comes from having these folders in the chroot. How can I allow Apache access to this chroot?