Permission Denied for FTP User

9,850

Solution 1

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

Solution 2

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:
9,850

Related videos on Youtube

Alasdair
Author by

Alasdair

Updated on September 18, 2022

Comments

  • Alasdair
    Alasdair almost 2 years

    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?

    • Admin
      Admin almost 12 years
      Can you post your /etc/proftpd/proftpd.conf?
    • Lars Kotthoff
      Lars Kotthoff almost 12 years
      Are you by any chance trying to write the files with a slash prepended?