SFTP 錯誤:開啟寫入:權限被拒絕

SFTP 錯誤:開啟寫入:權限被拒絕

我僅為 SFTP 創建了一個使用者和一個群組,當我嘗試使用 Filezilla 傳輸檔案時/var/www出現以下錯誤:

Open for write: permission denied

我已經sshd_config這樣配置:

#Subsystem Sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp

Group sftp_only Match
ChrootDirectory /var/www
ForceCommand internal-sftp
X11Forwarding No
AllowTcpForwarding No

/var/www 和子目錄是chown root:rootchmod 755

SELinux 已停用。

任何想法 ?

答案1

的權限/var/www不允許 chrooted 使用者在其中建立文件。
這是正確的,也是有意為之的。
您必須在其中建立一個/var/www具有適當使用者權限的資料夾。

/var/www用戶不可寫。

相關內容