I have a directory called
/home/user1. In this directory, is a counter-strike game server that requires the permissions of the folder and all the files in it to be
user1 rwe (read, write, execute).
What I am trying to do is set up debian's SFTP server, and jail user1 to user1's directory.
However the game server's permissions requirements are getting in the way.
Both vsftpd and sshd state that root permissions must set on the directories you wish to jail. Therefore when I set the directory
/home/user1 and all the files it contains to ownership by root, the game server doesn't start. But when I set the
/home/user1 directory and all the files in it to
user1 rwe permissions, the sftpd and sshd servers disconnnect in filezilla with the following message:
Response: 500 OOPS: vsftpd: refusing to run with writable root inside chroot()
Error: Critical error: Could not connect to server
Now I can give
user1 chroot permissions in the ftp accounts, but then they are free to roam the server and this is not desirable.
What I need to do is give
user1 rwe permissions in vsftpd or sshd, that are jailed to the
In addition I would also like
admin to be jailed to the
home directory as well, but be able to manage game servers in
/home/user3 directories with rwe permissions.