Cannot delete or edit files on ProFTPD server

10,908

Solution 1

From a quick read of the docs on limits, your limit configuration looks like it should do what you want. The problem is likely file system permissions.

You may want to read up on the mode and umask settings here. ProFTPD creates files with a base mode of 666 (read/write/no execute). The umask setting is used to further restrict the permissions specified by the mode. Check your .conf for a umask setting that may be restricting permissions and preventing you from overwriting, moving or deleting files.

example:

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask               022

If there is any umask setting in the .conf file, try commenting it out and upload a file, then verify the file system permissions on it and experiment from there. Good luck.

Solution 2

Apparently also check to see that the fileserver login owns the folder(s).

This from an accepted answer to a similar question on another certain IT community site:

supposing you used the standard user for proftpd you need to first make this user the owner of the folder (when your accessing the FTP the system will recognise the server as this user regardless of who you login as)

run code snippet 1) first

secondly you need to ensure this user has read/write access and presumably other users can only read from it. Use code snippet 2)

Code Snippets

1) chown -R userftp /home/FTP-shared/read-write
2) chmod -R 0755 /home/FTP-shared/read-write

Solution 3

You could check the ownership & file permissions on the fileserver user's home directory (or FTP directory, if this is different)

Share:
10,908

Related videos on Youtube

Cory Walker
Author by

Cory Walker

I mainly use Linux (Ubuntu distro), I enjoy programming (C++, Java, PHP), and I love electronics, physics, and science. I am very involved in open source projects like iphonelinux and linux4nano. I also manage the NXT++ project on Sourceforge.

Updated on September 17, 2022

Comments

  • Cory Walker
    Cory Walker almost 2 years

    I have an Linux server running Ubuntu Jaunty. I have successfully set up an FTP server for the user 'fileserver' using this configuration in proftpd.conf:

    <Global>
      <Limit ALL>
        DenyAll 
        AllowUser fileserver
      </Limit>
    </Global>
    

    I this allows only the 'fileserver' user to login, and nobody else. I am able to upload files fine. This is what I want so far. The problem is, I cannot edit, overwrite, delete or move any files. I would like to have full, unrestricted access when I log in. How can I do this?

    I've seen this ProFTPD tutorial, but I still can't figure out how to allow a user to have all the permissions, to enable deletes and edits.

    • dr.pooter
      dr.pooter about 15 years
      be careful when playing with these settings, there are some traversal attacks that might bite you