I have a file from another pc with ubuntu, the owner of the file is my user account from this pc. How do I change the owner to my useraccount on another pc so that I can use it?

When i try to change file permissons via nautilus i get the message you're not the owner, that's the reason you can't file permissions.

But i'm the owner just on another Ubuntu with another account. Do i first have to change the rights on the origin Filesystem or can i take the rights somehow over?

2 Answers 2


Command line instructions:

Use the chown command.


sudo chown user file

Where user is the username on the second pc. This needs to be run from the second pc.

GUI instructions:

Run Nautilus with sudo privileges

  • Alt+F2
  • Enter gksu nautilus.
  • Enter your password.

  • Now you can right-click on a file, go to the Permissions tab and select the new owner from the Owner combobox.

    alt text

  • worth a +1 :P
    – htorque
    Dec 13, 2010 at 19:39

To be more precise, you can change one file to you as the owner and owning group by

sudo chown nes:nes filename.txt

(replace "nes" by your username and "filename.txt" by the file name).

To change the owner of a whole directory to you, use the "-R" flag for "recursive":

sudo chown -R nes:nes folderName

But: DO NOT do this with any system folder (/usr, /root, /, /boot, /etc...), but ONLY with folders in your home directory or you WILL break your system.

If you use "ls -l" and it shows you the owner of the files as "1002", you can use

find . -uid 1002 -exec chown nes:nes {} +

... to change all users of all files owned by "1002" to "nes" in the current directory you are in and all sub-directories.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .