I have an FTP user whose default is /root/ftpuser

This user can login fine. The user is the owner of the directory & the directory is even set to 777 permissions.

But the user can't upload anything, the display is:

Status: Connecting to xx.xxx.xxx.xx:21...
Status: Connection established, waiting for welcome message...
Response:   220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response:   220-You are user number 2 of 50 allowed.
Response:   220-Local time is now 05:12. Server port: 21.
Response:   220-This is a private system - No anonymous login
Response:   220-IPv6 connections are also welcome on this server.
Response:   220 You will be disconnected after 15 minutes of inactivity.
Command:    USER ftpuser
Response:   331 User ftpuser OK. Password required
Command:    PASS *********
Response:   230 OK. Current restricted directory is /
Command:    OPTS UTF8 ON
Response:   200 OK, UTF-8 enabled
Status: Connected
Status: Starting upload of test.html
Command:    CWD /
Response:   550 Can't change directory to /: Permission denied
Command:    MKD /
Response:   550 Can't create directory: Permission denied
Command:    CWD /
Response:   550 Can't change directory to /: Permission denied
Command:    SIZE /btn.png
Response:   550 Can't check for file existence
Command:    TYPE I
Response:   200 TYPE is now 8-bit binary
Command:    PASV
Response:   227 Entering Passive Mode (66,232,106,33,52,218)
Command:    STOR /test.html
Response:   553 Can't open that file: Permission denied
Error:  Critical file transfer error

It's a Linux CentOS 6 server.

Any ideas?

  • Can you post your /etc/proftpd/proftpd.conf? – user89350 Jun 29 '12 at 16:49
  • Are you by any chance trying to write the files with a slash prepended? – Lars Kotthoff Jun 29 '12 at 16:59

Unfortunately you didn't give us many information. My guess would be that selinux is enabled. Try running sestatus and see for yourself is selinux directives are enforced or not. If yes, you will have to toggle the selinux variables accordingly.

| improve this answer | |

I had the same issue. Edited the /etc/vsftpd.conf and changed this: write_enabled=YES and it worked.

| improve this answer | |

From the given details, I can only think of.

Turn iptables off.
Disable selinux.

It might help.

Also, Having not enough details and knowledge i wonder why anyone should have requirement to have ftp path in /root/ftpuser.

| improve this answer | |

I am having a similar issue. There could be some sort of "jail" or "cage" over the user for security reasons directly managed by the ftp server when the user logs in. Programs like Jailkit also can affect that. Maybe it is not the right answer, but in pureftp it put me on the right track.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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