Question on Changes of Ownership with NFS and Rsync

When I copy a file from my machine to a NFS shared directory on a remote NAS box using copy and paste in Dolphin, the ownership changes from

User: alastair 
Group: users 

on my machine to

User: root
Group: root

on the NAS

However if I copy the file from my machine to the same remote directory on the NAS using rsync, the ownership on the NAS changes to

User: 500
Group: users

I am sure I have set the rsync process to preserve ownership, times and permissions. I have no idea why my uid is given as 500 on the NAS. Also no idea why the copy using NFS should change ownership to root.

I am reading up but if anybody can shine a light on this it would be appreciated. The biggest problem it has caused so far is that the permissions given on the NAS to the NFS copied files give only root any permissions. Nobody else gets a look in! I need to understand what is going on here so I can take corrective action.


And I guess the userid of alastair on “my machine” is 500?

Hi Henk,
That is what I thought but no my uid is 1000 on my machine.
The user interface on NAS doesn’t yet show me my UID on that box. I am still trying to find out.

Various factors can affect the user ID:

  • “cp” do not preserve owners, etc unless the “-p” or “-a” (or equivalent) is used.
  • NFS3 and NFS4 handler user IDs different: 3 assumes identical numeric IDs and 4 maps symbolic names.
  • Export and NFS mount options

Please provide

  • User ID (both symbolically and numerically) on all boxes
  • NFS mount type (3 or 4)
  • Export and NFS mount options
  • Full commands

Using ssh or rsync protocol? Please show exact command.

Hi, please forgive delayed reply. Will try to get back to this at weekend.
Meanwhile many thanks for the replies.