Results 1 to 8 of 8

Thread: rsync sets owner to 500 - user #500

  1. #1
    Join Date
    Apr 2012
    Beans
    33

    rsync sets owner to 500 - user #500

    I want to backup my laptop to a NAS drive using rsync. On both devices I have the same user and group. I'm using rsync with options: rltzuv. If I check the permissions on the NAS device I find the correct group setting but user is set to "500 - user #500". If I look into /etc/passwd user 500 is guest.
    What can I do that ownership is set to the same user as on the laptop ?

  2. #2
    Join Date
    May 2009
    Location
    Courtenay, BC, Canada
    Beans
    1,661

    Re: rsync sets owner to 500 - user #500

    try the option
    -p, --perms preserve permissions
    http://linux.die.net/man/1/rsync

  3. #3
    Join Date
    Apr 2012
    Beans
    33

    Re: rsync sets owner to 500 - user #500

    Thanks, but -a equals -rlptgoD, so -p is already included.

  4. #4
    Join Date
    May 2009
    Location
    Courtenay, BC, Canada
    Beans
    1,661

    Re: rsync sets owner to 500 - user #500

    Quote Originally Posted by xtrailrunner View Post
    Thanks, but -a equals -rlptgoD, so -p is already included.
    ah, you listed
    Quote Originally Posted by xtrailrunner
    rltzuv
    sorry for not being a mind reader


  5. #5
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,790
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: rsync sets owner to 500 - user #500

    Hi xtrailrunner.

    Could you post the actual command you are using?

    Are you using rsync over ssh, or there's a rsync daemon on the NAS?

    Is there a username on the NAS that matches laptop's ?

    Have you tried mapping uids instead of usernames (option --numeric-ids)?

    Regards.

  6. #6
    Join Date
    Apr 2012
    Beans
    33

    Re: rsync sets owner to 500 - user #500

    Here is the command:
    rsync -rltzuv --delete --stats --exclude='/dev' --exclude='/lost+found' --exclude='/media' --exclude='/mnt' --exclude='/proc' --exclude='/run' --exclude='/sys' --exclude='/tmp' --exclude='/var/crash' --exclude='/home/jmenge/.cache' --exclude='/home/jmenge/.local/share/Trash' --exclude='/home/jmenge/Downloads' --exclude='/home/jmenge/VBShared' --exclude='/home/jmenge/VirtualBox' --exclude='/home/jmenge/.recoll/xapiandb' '/' '/media/mybook/Public/Lenovo_T430/Ubuntu1304/Backup_110613'
    The command worked until a new firmware was installed on the NAS. Both files from root and from my user were backed up correctly.

    The NAS is mounted using NFS. Do I need the rsync daemon on the NAS ?

  7. #7
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,790
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: rsync sets owner to 500 - user #500

    Thanks.

    I don't see neither the option -a nor -p as you suggested you were using. Have you tried adding any of those options?

    Also, in order to properly back up files owned by root to a NFS mount, you need to set the export option 'no_root_squash' (on the NAS).

    Regards.

  8. #8
    Join Date
    Apr 2012
    Beans
    33

    Re: rsync sets owner to 500 - user #500

    Thanks. The firmware import replaced my /etc/exports file. Therefore I had to modifiy the settings again and it works now. Sorry for the confusion concerning the options. I used two different versions of the command over the time and got confused when writing the posts.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •