Ubuntu - FTP file edit permission denied

10,734

-Solution-

Solving this took me some time but I finally figured it out. You must first, login to the account you want on FTP (On a local network you may leave the port blank). If you can access the files, you are fine. Next, open a terminal connection to the Ubuntu Server itself. Once you have done so, login to an account with sudo permissions. You must then change the owner of the file. I suggest giving the user ownership of Everything in order to ensure full access. First, run cd ~to change the seclected folder, thensudo chown -R [User's Username]:root /home/[username]. That should change the owner of the folder to the specified user along with all the files inside the folder. If you want to change ownership of just a specific file, run sudo chown [User's Username]:root [Directory (example: /home/user/folder/document.txt)]

-Flat out Instructions-

Login to the user (Sudo permissions required), run cd~, find the folder you want, and run sudo chown -R [User's Username]:root /home/[username]. Or for a specific file, sudo chown [User's Username]:root [Directory (example: /home/user/folder/document.txt)]

Share:
10,734

Related videos on Youtube

Randall Barker
Author by

Randall Barker

Updated on September 18, 2022

Comments

  • Randall Barker
    Randall Barker over 1 year

    I have been trying to make an Unturned server for my friends, and I cannot edit ANY files in it.

    What I've Tried:

    • I can't delete or upload to the FTP server; when I try to change the file permissions, it denies it.

    • I have changed the write_enable=NO to write_enable=YES in /etc/vsftpd.conf but it didn't help. I cannot edit the permissions from the FTP server.

    • Researching the web for answers, but I cannot find anything on this anywhere on the internet.

    Other Details:

    • I am using FileZilla for FTP services.

    Goal:

    I want to make it so anyone that can see the folder can edit it, and not just the terminal user.

    If anyone can help me that would be great.

    • Caturday Saint
      Caturday Saint almost 7 years
      Is the user you/your friends use to log into the FTP server granted permissions for FTP transmission, and the FTP share?
    • Randall Barker
      Randall Barker almost 7 years
      And how do I do that exactly? I'm totally new to this FTP stuff.
    • Caturday Saint
      Caturday Saint almost 7 years
      There are a few ways to do this, but the best way is to see what group a folder belongs to, and make sure that the users belong to that group. You can use ls -l to list file/folder permissions in your current directory, which will show you the owner and group of the file/folder (in that order). You'd then use groups to see what group the current (logged in) user belongs to. If you do have multiple user accounts, use su [username here] to switch to each user.
    • Randall Barker
      Randall Barker almost 7 years
      Doesn't even work. I have used all the accounts and nothing will let me edit it. It's FTP. Not command line.
    • Caturday Saint
      Caturday Saint almost 7 years
      FTP is a protocol, which can be executed in a GUI, or terminal. Just to be certain, you have physical access to this server, right?
    • Randall Barker
      Randall Barker almost 7 years
      I got it fixed. I had to change the owner of the files. It was in root and I couldn't login to root. Took me a while. This was yesterday that I figured this out.