想要:创建文件夹并上传文件www-数据:www-数据用户
当前尝试:创建文件夹,上传文件ftp:无组和 filezilla
结果:即使ftp:无组可以上传文件但不能创建文件夹
操作:尝试通过 ftp 创建新文件夹
结果:权限被拒绝
使用 Debian 9 和启用 ACL 但不启用 SELINUX。
安装时WP Hide & Security Enhancer
需要指向 wordpress 安装的 ftp 服务。
文件夹权限:
777 drwxrwxrwx 5 ftp nogroup 4096 May 30 12:12 /var/www/html
调试输出:
dispatching PRE_CMD command 'MKD myNewFolder' to mod_exec
dispatching PRE_CMD command 'MKD myNewFolder' to mod_rewrite
dispatching PRE_CMD command 'MKD myNewFolder' to mod_tls
dispatching PRE_CMD command 'MKD myNewFolder' to mod_core
dispatching PRE_CMD command 'MKD myNewFolder' to mod_core
dispatching PRE_CMD command 'MKD myNewFolder' to mod_quotatab
dispatching CMD command 'MKD myNewFolder' to mod_core
in dir_check(): setting umask to 0666 (was 0666)
chmod(/.abcDEFGHIJKLM) failed: Permission denied
dispatching POST_CMD_ERR command 'MKD myNewFolder' to mod_exec
dispatching POST_CMD_ERR command 'MKD myNewFolder' to mod_quotatab
dispatching LOG_CMD_ERR command 'MKD myNewFolder' to mod_log
dispatching PRE_CMD command 'MKD /myNewFolder' to mod_exec
dispatching PRE_CMD command 'MKD /myNewFolder' to mod_rewrite
dispatching PRE_CMD command 'MKD /myNewFolder' to mod_tls
dispatching PRE_CMD command 'MKD /myNewFolder' to mod_core
dispatching PRE_CMD command 'MKD /myNewFolder' to mod_core
dispatching PRE_CMD command 'MKD /myNewFolder' to mod_quotatab
dispatching CMD command 'MKD /myNewFolder' to mod_core
in dir_check(): setting umask to 0666 (was 0666)
chmod(/.abcDEFGHIJKLM) failed: Permission denied
dispatching POST_CMD_ERR command 'MKD /myNewFolder' to mod_exec
dispatching POST_CMD_ERR command 'MKD /myNewFolder' to mod_quotatab
dispatching LOG_CMD_ERR command 'MKD /myNewFolder' to mod_log
scrubbing scoreboard
ROOT PRIVS at scoreboard.c:1541
RELINQUISH PRIVS at scoreboard.c:1544
ROOT PRIVS at scoreboard.c:1575
RELINQUISH PRIVS at scoreboard.c:1681
finished scrubbing scoreboard
proftpd.conf:
Include /etc/proftpd/modules.conf
UseIPv6 off
IdentLookups off
ServerName "myServerName"
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 \*.*/
DefaultRoot /var/www/html
RequireValidShell off
Port 21
<IfModule mod_dynmasq.c></IfModule>
MaxInstances 30
User ftp
Group nogroup
Umask 666 666
AllowOverwrite on
TransferLog /var/log/proftpd/xferlog
SystemLog /var/log/proftpd/proftpd.log
<IfModule mod_quotatab.c>
QuotaEngine off
</IfModule>
<IfModule mod_ratio.c>
Ratios off
</IfModule>
<IfModule mod_delay.c>
DelayEngine on
</IfModule>
<IfModule mod_ctrls.c>
ControlsEngine off
ControlsMaxClients 2
ControlsLog /var/log/proftpd/controls.log
ControlsInterval 5
ControlsSocket /var/run/proftpd/proftpd.sock
</IfModule>
<IfModule mod_ctrls_admin.c>
AdminControlsEngine off
</IfModule>
<Anonymous /var/www/html>
User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
MaxClients 10
DisplayLogin welcome.msg
DisplayChdir .message
<Directory *>
<Limit WRITE READ>
AllowAll
</Limit>
</Directory>
<Directory incoming>
Umask 022 022
<Limit READ WRITE>
AllowAll
</Limit>
<Limit STOR CWD MKD RMD DELE XRMD XMKD>
AllowAll
</Limit>
</Directory>
</Anonymous>
Include /etc/proftpd/conf.d/