You are not logged in.

#1 2012-08-04 22:04:47

smohr
Member
Registered: 2012-05-29
Posts: 33

proftpd - chroot to /home/

Hey everybody,

I started proftpd on my arch linux server. I want every user logging in to chroot to /home, NOT /home/USERNAME.

In /etc/proftpd.conf, I added:
  DefaultRoot /home

When I log in from gnome, I am chrooted to /home, but my userdir is displayed. In Windows, it is like I am chrooted to my userdir.

What is wrong?

Offline

#2 2012-08-06 04:35:34

R0B
Member
Registered: 2012-07-09
Posts: 2

Re: proftpd - chroot to /home/

Post the rest of your conf file for ProFTPD. What you said should have worked fine. And when you mean on gnome you mean that in your file browser you cannont leave /home?

Offline

#3 2012-08-06 09:39:15

smohr
Member
Registered: 2012-05-29
Posts: 33

Re: proftpd - chroot to /home/

proftpd.conf:

# This is a basic ProFTPD configuration file (rename it to 
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName			"FTP-Server"
ServerType			standalone
DefaultServer			on

# Port 21 is the standard FTP port.
Port				21

# Don't use IPv6 support by default.
UseIPv6				off

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask				027

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances			10

# Set the user and group under which the server will run.
#User				nobody
#Group				nobody

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot /home

# Normally, we want files to be overwriteable.
AllowOverwrite		on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
  DenyAll
</Limit>

# A basic anonymous configuration, no upload directories.  If you do not
# want anonymous users, simply delete this entire <Anonymous> section.

I tested a bit and get an interesting information:
If DefaultRoot is /, then I can see the whole file system when I connect to ftp from gnome
If I connect to ftp from windows 7, I will only see my home directory. It seems to be some funny windows bug or whatever.

Thank you anyway.

Offline

Board footer

Powered by FluxBB