proftp 服务器在登录时给出“没有这样的文件或目录”,即使目录存在

proftp 服务器在登录时给出“没有这样的文件或目录”,即使目录存在

我在新的和更新的 Debian Jessie 8.7 上设置了一个新的 proftp 实例,如下所示https://www.howtoforge.com/tutorial/proftpd-installation-on-debian-and-ubuntu/但新用户成功登录后再次断开连接(任何用户 - 甚至 root e = 当允许时):

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 ~$

我的配置如下所示(我将其精简以查看发生了什么):

# 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>

的主目录otrupload\ftpshare

# echo ~otrupload
/ftpshare

并具有以下权限:

drwxrwxrwt  2 otrupload otrupload      4096 Jan 30 06:04 ftpshare

有什么建议吗?我上次安装时它还在运行,而且我完全按照相同的说明操作?

答案1

尝试在您的配置中添加此行:

这将重定向并将用户监禁在其目录中

DefaultRoot ~

答案2

好的 - 我解决了这个问题。原因是.和的权限..由于未知原因被设置为不允许任何人访问。

我将它们设置为

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

现在它正在工作。

答案3

对于一般的解决方案,您可以使用

DefaultRoot  ~

这会将所有用户的根目录切换至他们的主目录。

相关内容