
FTP 서버와 사용자를 설정했습니다. 하지만 파일을 업로드하거나 편집할 수 없는 것 같습니다.
사용자가 777 권한을 채웠음에도 불구하고. 사용자의 루트 폴더에 파일을 업로드할 수도 없습니다.
서버 OS: 우분투
클라이언트 OS 창
FTP 서버/클라이언트: fileZila
통나무:
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Server does not support non-ASCII characters.
Status: Logged in
Status: Starting download of /var/www/html/wp/staged/wp-content/themes/Newspaper/Newspaper/woocommerce/single-product.php
Status: File transfer successful, transferred 1,193 bytes in 1 second
Status: Starting download of /var/www/html/wp/staged/wp-content/themes/Newspaper/Newspaper/woocommerce/single-product.php
Status: File transfer successful, transferred 1,193 bytes in 1 second
Status: Starting upload of C:\Users\User\AppData\Local\Temp\fz3temp-2\single-product.php
Command: PASV
Response: 227 Entering Passive Mode (165,227,173,119,117,244).
Command: STOR single-product.php
Response: 550 Permission denied.
Error: Critical file transfer error
파일 권한:
그룹 및 사용자:
vsftpd.conf:
# Standalone mode
listen=YES
max_clients=200
max_per_ip=4
# Access rights
anonymous_enable=YES
local_enable=NO
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
# Security
anon_world_readable_only=NO
connect_from_port_20=YES
hide_ids=YES
pasv_min_port=50000
pasv_max_port=60000
# Features
xferlog_enable=YES
ls_recurse_enable=NO
ascii_download_enable=NO
async_abor_enable=YES
# Performance
one_process_model=YES
idle_session_timeout=120
data_connection_timeout=300
accept_timeout=60
connect_timeout=60
anon_max_rate=50000
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
#Userlist
userlist_deny=NO
userlist_enable=YES
userlist_file=/etc/vsftpd.allowed_users
vsftpd.allowed_users:
ftpuser
여기서 무슨 일이 일어나고 있는지 아시나요?
업데이트: 파일이 저장된 폴더의 권한을 777로 변경했는데 여전히 작동하지 않습니다.
통나무:
Status: Logged in
Status: Starting download of /var/www/html/wp/staged/wp-content/themes/Newspaper/Newspaper/woocommerce/single-product.php
Status: File transfer successful, transferred 1,193 bytes in 1 second
Status: Starting upload of C:\Users\User\AppData\Local\Temp\fz3temp-2\single-product.php
Command: PASV
Response: 227 Entering Passive Mode (*xxxxxxxxxxxx*).
Command: STOR single-product.php
Response: 550 Permission denied.
Error: Critical file transfer error
Status: Retrieving directory listing of "/var/www/html/wp/staged/wp-content/themes/Newspaper/Newspaper"...
Status: Directory listing of "/var/www/html/wp/staged/wp-content/themes/Newspaper/Newspaper" successful
Status: Disconnected from server
Status: Connection closed by server
답변1
귀하의 서버가 활짝 열려있는 것 같습니다. 당신은
anonymous_enable=YES
local_enable=NO
ftp
따라서 누구든지 사용자 이름 또는 을 사용하여 실제 비밀번호 확인 없이 FTP 서버에 연결할 수 있고 , (지정되지 않음, 기본값은 ) anonymous
로 구성된 사용자 계정이 액세스할 수 있는 모든 파일이나 디렉터리에 액세스할 수 있습니다. 이러한 익명 로그인은 일반 비밀번호 인증 로그인보다 더 엄격하게 통제됩니다.ftp_username
ftp
익명 사용자가 기존 파일을 덮어쓰는 것을 허용하지 않을 수 있으므로 업로드가 실패했을 수 있습니다 vsftpd
. 익명 사용자로 새 파일을 업로드하기 전에 이전 파일을 명시적으로 삭제하거나 이름을 바꿔야 했을 것 같습니다. 하지만 당신이 있었기 때문에
anon_other_write_enable=NO
그것은 당신이 그렇게 하는 것을 허용하지 않았을 것입니다.
anonymous_enable
웹 사이트 유지 관리를 허용하기 위해 FTP 서버를 사용하는 경우 인증되지 않은 액세스를 허용하지 않으려면 NO와 YES로 설정하는 것이 가장 좋습니다. local_enable
그렇지 않으면 FTP 클라이언트를 사용하는 모든 사람이 귀하의 사이트를 쉽게 훼손할 수 있습니다.
(그리고 암호화 없는 인증은그래서지난 천년: 보안 개인 네트워크에서만 FTP 액세스를 허용하지 않는 한 TLS를 통해 FTP를 설정하고 싶을 것입니다!)
답변2
다음을 사용하여 vsftpd를 제거했습니다.
sudo apt-get purge vsfpt
그런 다음 이 간단한 가이드를 사용하여 구성했습니다. vsftpd를 설정하는 방법
아직도 문제가 무엇인지는 모르지만 지금은 작동합니다.