Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Can you post your /etc/proftpd/proftpd.conf? –  Nic Young 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
add comment

3 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.