1. Background
Recently, I have set up nginx on the cloud host. I plan to upload a static webpage through ftp to test it. Then I went into ftp and put it on it. But I didn’t see the successful upload as I imagined. See The is 200 PORT command successful. Consider using PASV. 553 Could not create file.
Then I went to find Du Niang. Many people said that it is enough to turn off the firewall. Then I went to turn it off and found that I did not turn on the firewall. Then I took a closer look (553 Could not create file.), no matter how bad my English is, I can see this. It means "553 Unable to create file", then go to ls -l on the ftp-accessible folder on the cloud host, and find that the reason is that there is no permission, and the solution is over;
Two, the solution
If the first command can be solved, there is no need to execute the second command
//o 表示其他以外的人,+ 表示增加权限,w 表示可写入
sudo chmod o+w /(这里是可访问文件夹的路径) //注意这里写目录的绝对或相对路径,不是直接写根目录'/'
sudo chmod 777 -R /(跟上面一样) //将目前目录下的所有文件与子目录皆设为任何人可读取和执行
sudo systemctl restart vsftpd.service //重启一下服务
Pay attention to the path of the file, do not directly use the root directory '/' to add permissions
Then I tried to reconnect to ftp, put a wave, and then it worked, and that was the reason;