1. 程式人生 > >FTP上傳檔案報錯200 PORT command successful. Consider using PASV. 553 Could not create file.

FTP上傳檔案報錯200 PORT command successful. Consider using PASV. 553 Could not create file.

一、背景

最近搭好的在雲主機上搭好了nginx環境,打算通過ftp上傳一個靜態的網頁上去test一波,然後進去了ftp,在上面put了一下,結果沒有看到想象中上傳成功的樣子,看到的是200 PORT command successful. Consider using PASV. 553 Could not create file.

然後就去找度娘了,很多人說關閉防火牆就可以了,然後去關才發現我沒有開啟防火牆,接著去雲主機上ftp可訪問的資料夾上ls  -l  一下,發現是沒有許可權的原因,不知道這個是不是主要原因,先解決了再說;

二、解決方法

sudo chmod o+w /(這裡是可訪問資料夾的路徑)

sudo chmod 777 -R /(跟上面一樣)

sudo systemctl restart vsftpd.service   //重啟一下服務

然後重新連線ftp嘗試了一下,put了一波,然後就成了,果然就是這個原因;