Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to transfer files from Windows to a vsFTPd server running on Linux. I can successfully transfer files to the home directory, but when I change the directory, I get an error. Below is a transcript demonstrating the problem.

C:\>ftp
ftp> open 10.50.0.21
Connected to 10.50.0.21.
220 (vsFTPd 2.0.5)
User (10.50.0.21:(none)): user1
331 Please specify the password.
Password:
230 Login successful.

ftp> put D:/rez2g.ahk
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 File receive OK.
ftp: 2401 bytes sent in 0.00Seconds 2401000.00Kbytes/sec.

ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
apache-tomcat-6.0.29
rez2g.ahk
victor.war
226 Directory send OK.
ftp: 48 bytes received in 0.00Seconds 48000.00Kbytes/sec.

ftp> cd 1/
250 Directory successfully changed.
ftp> pwd
257 "/home/user1/1"

ftp> put D:/rez2g.ahk
200 PORT command successful. Consider using PASV.
553 Could not create file.
share|improve this question
add comment

1 Answer

There has been an old issue with SELINUX that didn't allow FTP users to write in their home paths.
As far as I've seen, you can fix it in two ways:

[1] Disable selinux (not recommended for production environment)

[2] execute the following command as root (preferred one):

setsebool -P ftp_home_dir=1

Edit:
Can you make sure write_enable=YES is added in /etc/vsftpd/vsftpd.conf?

Edit 2:
I thught of several other things that may be an issue, but are fairly easy to check:
File already exists, but you have no permissions to overwrite it
Disk is full (or quota reached)

Also, this may be a weird umask issue, with vsftp overriding. Are folders you create 644?
For user1 user, what is the output of umask command?

share|improve this answer
    
executed the above command and then i executed ftp but still the error remains as it is –  vinod Feb 27 '12 at 12:34
    
@vinod I edited the post. Something silly crossed my mind, but it's too obvious and thus quite easy to oversee :-) –  extremko Feb 27 '12 at 12:42
    
in /etc i don't have vsftpd.conf. i have the .conf file in the location "/etc/vsftpd" when i changed it also results the same error –  vinod Feb 27 '12 at 12:54
    
@vinod I made a mistake, you are correct. It should be /etc/vsftpd/vsftpd.conf –  extremko Feb 27 '12 at 13:03
    
the output for unmask is 0002 –  vinod Feb 27 '12 at 13:05
show 9 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.