1

I setup a new proftp instance on a new and updated Debian Jessie 8.7 following https://www.howtoforge.com/tutorial/proftpd-installation-on-debian-and-ubuntu/ but the new user gets disconnected again (any user - even root e=when allowed) after successfully logging in:

03:20:55 ~$ ftp otrupload@ftpserver:21
Connected to ftpserver.
220 ProFTPD 1.3.5 Server (Debian) [192.168.1.101]
331 Password required for otrupload
Password:
230 User otrupload logged in
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I
local: 21 remote: 21
229 Entering Extended Passive Mode (|||49865|)
550 21: No such file or directory
221 Goodbye.
03:22:14 ~$

My Config looks as follow (I trimmed it down to see what is going on):

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6                         off
# If set on you can experience a longer connection delay in many cases.
IdentLookups                    off

ServerName                      "Debian"
ServerType                      standalone
DeferWelcome                    off

MultilineRFC2228                on
DefaultServer                   on
ShowSymlinks                    on

TimeoutNoTransfer               600
TimeoutStalled                  600
TimeoutIdle                     1200

DisplayLogin                    welcome.msg
DisplayChdir                    .message true
ListOptions                     "-l"

DenyFilter                      \*.*/

# Port 21 is the standard FTP port.
Port                            21

MaxInstances                    30

# Set the user and group that the server normally runs at.
User                            proftpd
Group                           nogroup

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask                           022  022
# Normally, we want files to be overwriteable.
AllowOverwrite                  on


TransferLog /var/log/proftpd/xferlog
SystemLog   /var/log/proftpd/proftpd.log



<Global>
    RootLogin   off
    RequireValidShell off
</Global>

DefaultRoot  /ftpshare/

<Limit LOGIN>
    DenyGroup !ftpgroup
</Limit>

The home directory of otrupload is \ftpshare

# echo ~otrupload
/ftpshare

and it has the following permissions:

drwxrwxrwt  2 otrupload otrupload      4096 Jan 30 06:04 ftpshare

Any suggestions what is going on? It was working on my last install and I followed exactly the same directions?

4
  • Your FTP transcript is missing some information, particularly the commands you typed into the ftp> prompt. If you could, could you re-do that using the -d command-line option, and provide/update the full transcript there? That will help show which specific FTP commands/responses are involved.
    – Castaglia
    Jan 30, 2017 at 17:37
  • Nope - it is complete. proftpd can not find the home folder even though it is there with the correct permissions.
    – Rainer
    Jan 30, 2017 at 17:39
  • If you say so. What's the ProFTPD debug logging, debug level 10 show, when you attempt to log in?
    – Castaglia
    Jan 30, 2017 at 18:01
  • Also, the ftp(1) client defaults to using port 21, thus you should only need to use ftp otrupload@ftpserver. In fact, it's possible that that trailing ":21" might be causing unexpected issues; not all FTP clients handle that URL-like construction the same way.
    – Castaglia
    Jan 30, 2017 at 18:09

3 Answers 3

0

Try to add this line in your configuration:

This will redirect and jail the user in his directory

DefaultRoot ~
1
  • Nope - same problem.
    – Rainer
    Jan 30, 2017 at 16:05
0

OK - I solved the problem. The reason were permissions of . and .. which were, for unknown reasons, set to no access to anybody.

I set them to

drwxr-xr-x 22 root      root           4096 Jan 30 09:46 .
drwxr-xr-x 22 root      root           4096 Jan 30 09:46 ..

and now it is working.

0

For a general solution, you can use

DefaultRoot  ~

That will chroot all users to their home directory.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .