FTP help

Got problems with Bubba? Then this forum is for you.
Posts: 24
Joined: 23 Oct 2007, 17:38

FTP help

Post by Kramer » 09 Mar 2009, 15:59


I've tried to find the answer on this forum and on the net but no luck.

I want to creat a user that DOESN'T have acces to folders outside /home/user/ when login in via FTP. What do a need to change in /etc/proftpd.conf ? I'm guessing that this is the right file to change in since I've not added any other ftp program. I don't want this user to be able to go into /storage , /otherusers , /etc this user should only have acces to it's own home folder and sub folders.

This is what my /etc/proftpd.conf file lookes like.
# /etc/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.

ServerName "Bubba"
ServerType standalone
DeferWelcome off

MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
RequireValidShell off
DefaultRoot /home/

TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200

Posts: 12
Joined: 03 Mar 2009, 14:05

Post by bk » 09 Mar 2009, 18:11

The file /etc/proftpd.conf contains one line starting with DeafultRoot. Replace that line with these two:

Code: Select all

DefaultRoot                     ~ jaileduser
DefaultRoot                     /home/ !jaileduser
Then jaileduser will only have access to his own home.

Remember to restart ftp:

Code: Select all

/etc/init.d/proftpd restart

Posts: 24
Joined: 23 Oct 2007, 17:38

Post by Kramer » 09 Mar 2009, 19:27

Thanks for the help and pointing me in the right direction but it seems that this applies to GROUPS not users. So I added a group with the same name as the jailed user and added the user to the group then I changed the file to

DeafultRoot ~ !NoJailGroups

This seems to work OK and I hope I didn't brake my system.