Hi - This is driving me mad..
FreeBSD 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401
I'm running lots of websites with www/apache24. I have developers looking access to modify files. I don't want to give access to server just to applicable sites. My setup is as follows:
I create user accounts for each site: site1user, site2user...
Each user has a home directory of:
Webroot: /usr/local/www/apache24/data/site1, site2, site3 and so on...
My ssh config:
I use filezilla to connect, test and watch: /var/log/auth.log
..
My permissions are as follows. My path to the home directories are owned by root:
Inside the site1 directory all the files are owned by the site1user.
If I remove the ChrootDirectory directive I can login and see all files for the system which I don't want. I have read lots of articles and feel my setup is correct but not..
Where am I going wrong?
Thank you.
FreeBSD 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401
I'm running lots of websites with www/apache24. I have developers looking access to modify files. I don't want to give access to server just to applicable sites. My setup is as follows:
I create user accounts for each site: site1user, site2user...
Each user has a home directory of:
/usr/local/www/apache24/data/site1
Webroot: /usr/local/www/apache24/data/site1, site2, site3 and so on...
My ssh config:
/etc/ssh/sshd_config
Code:
# override default of no subsystems
#Subsystem sftp /usr/libexec/sftp-server
Subsystem sftp internal-sftp -l INFO -f AUTH
..
..
Match User site1user
PasswordAuthentication yes
ChrootDirectory /usr/local/www/apache24/data
ForceCommand internal-sftp -l INFO
AllowTcpForwarding no
AllowAgentForwarding no
PermitTunnel no
PermitTTY no
X11Forwarding no
..
Code:
sshd[52053]: fatal: bad ownership or modes for chroot directory component "/"
My permissions are as follows. My path to the home directories are owned by root:
Code:
drwxr-xr-x 16 root wheel 512 Jan 20 2015 usr
drwxr-xr-x 14 root wheel 512 Sep 11 19:36 local
drwxr-xr-x 4 root wheel 512 Sep 11 21:15 www
drwxr-xr-x 6 root wheel 512 Sep 11 20:20 apache24
drwxr-xr-x 4 root wheel 1024 Sep 29 21:56 data
drwxr-xr-x 8 root root 1024 Sep 29 22:01 site1
If I remove the ChrootDirectory directive I can login and see all files for the system which I don't want. I have read lots of articles and feel my setup is correct but not..
Where am I going wrong?
Thank you.