On 4 March 2013 16:53, Chris Walker cdw_alug@the-walker-household.co.uk wrote:
Having dutifully followed advice and backed up my NAS drive using rsync, I have formatted the NAS and now want to write the contents of the rynced drive back to the NAS. But it gives me lots of 'Permission Denied' errors.
I'm unclear where you're seeing the GID of 199528447 appear, is it in this error message?
I tried to find the cause of this error on google but it only returns one result and that's no help at all. I then looked at the groups configuration GUI on the machine but there are no groups numbered above 500 so how come this one is saying 199528447? If it helps, the user number is the same.
Without knowing where this GID (and matching UID) is appearing I'm a bit stuck.
AIUI[*], when you rsync from host A to host B, if the same user/group appears on both systems then ownership should be retained even though the user/group ID (provided you told rsync to retain owner information, which is implied by -a, although something that didn't get mentioned in previous conversations is that rsync can only retain owner information if run as root). This begs the question of what happens if the user on host A doesn't exist on host B - I believe that in that case the numeric ID is retained.
If I start with the following users: <Host A> 1000,user1 1001,user2 1002,user3 1010,userA <Host B> 1000,user1 1002,user2 (same user but different UID) 1003,user3 (ditto) 1004,user4 (user unique to Host B)
.. and rsync from HostA to HostB, files initially owned by user1,user2,user3,and userA on HostA will now be owned on HostB by user1(easy),user2(matched on username),user2(matched on user ID),and non-existent user 1010 respectively. If that process created the backup, then you can apply the same logic to work out where the files end up on HostC.
Hopefully somewhere in all that will be an explanation that matches your symptoms? All comments about user(owner)/uid apply equally to group/gid.
[*]AIUI = As I Understand It. I'm not an rsync guru and this is what I believe through experience, which I just double checked in the rsync man pages to be more confident but I may well have missed something. Corrections welcome!