Hint 553 could not create file, the owner of this directory and permissions are set up, or report this error, that carefully online check, the problem solved as follows:
Error tips
Current directory is/home
Ftp>!ls-l
......
-rwxr-xr-x 1 root root 146 Aug 03:30 hosts
-rw-r--r--1 root Aug 02:09 host.txt
-rw-r--r--1 root Aug 07:14 logins.txt
.....
Ftp> put Host.txt
Local:host.txt Remote:host.txt
Entering passive Mode (127,0,0,1,62,184)
Ok to send data.
The File receive OK.
Bytes sent in 0.014 seconds (3.2 kbytes/s)
Ftp> put hosts
Local:hosts remote:hosts
Entering passive Mode (127,0,0,1,174,59)
Ok to send data.
The File receive OK.
146 bytes Sent in 0.046 seconds (3.1 kbytes/s)
Ftp> put/home/hosts
Local:/home/hosts Remote:/home/hosts
Entering passive Mode (127,0,0,1,232,15)
553 could not create file.
Ftp>
Problem:ftp> Put/home/hosts and Ftp> put hosts (current directory is/home
The execution of the parameters should be the same why didn't the previous one upload?
We have to analyze the reasons for this problem, probably like
1. Consider whether SELinux is the reason to disable SELinux to try
2. Perhaps the FTP folder does not write permission, confirm the directory permissions
3. Is there a write_enable=yes in the configuration file?
First try:
The code is as follows |
Copy Code |
1. setsebool-p Ftpd_disable_trans 1 2. Service VSFTPD Restart |
Don't look down if you're resolved, or look down another way.
We need to set the allow_ftpd_full_access to 1.
The code is as follows |
Copy Code |
[Root@umboyserver vsftpd]# setsebool allow_ftpd_full_access 1 [Root@umboyserver vsftpd]# setsebool allow_ftpd_use_cifs 1 [Root@umboyserver vsftpd]# setsebool Allow_ftpd_use_nfs 1 [Root@umboyserver vsftpd]# setsebool Ftp_home_dir 1 [Root@umboyserver vsftpd]# setsebool httpd_enable_ftp_server 1 [Root@umboyserver vsftpd]# setsebool tftp_anon_write 1 [Root@umboyserver vsftpd]# Service vsftpd restart Shutting down VSFTPD: [OK] Starting vsftpd for VSFTPD: [OK] [Root@umboyserver vsftpd]# getsebool-a|grep FTP Allow_ftpd_anon_write--> off Allow_ftpd_full_access--> on Allow_ftpd_use_cifs--> on Allow_ftpd_use_nfs--> on Ftp_home_dir--> on Httpd_enable_ftp_server--> on Tftp_anon_write--> on |
Continued:
New User for FTP
The code is as follows |
Copy Code |
Useradd ftp-new-s/sbin/nologin-g ftp-d/home/ftp-new Modify System Configuration Iptables /etc/sysconfig/iptables /etc/init.d/iptables restart |
recommend an anonymous user
1.vsftpd.conf file:
The code is as follows |
Copy Code |
Write_enable=yes Anon_mkdir_write_enable=yes Anon_other_write_enable=yes |
2.ftp Directory Permissions:
To view the FTP directory:
The code is as follows |
Copy Code |
> CAT/ETC/PASSWD | grep FTP Ftp:x:107:65534::/home/ftp:/bin/false |
FTP directory for/HOME/FTP
The code is as follows |
Copy Code |
Chown root:root/home/ftp Chmod-r 755/home/ftp |
But this is not allowed to upload files. Because this is an anonymous user, the current directory owner is the root user; Really want to upload files in this directory to create a folder like the name is upload,
The code is as follows |
Copy Code |
Mkdir/home/ftp/upload Chown Ftp:root/home/ftp/upload |
This time can transfer files to the upload directory, but the root directory is still unable to upload files, this is anonymous users, if not anonymous users do not exist this problem.