Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: luckyBackup and file permissions confusion

  1. #1

    Default luckyBackup and file permissions confusion

    installed this program from the build service, and it functions as advertised except for the preservation of file ownership/permissions.

    I expected that starting the program as superuser and selecting the option of "preserve ownership,times" and "preserve permissions" would lead to a flawless backup of /home containing multiple users, but that was not the case. The ownership was changed to the user/session during the backup in spite of running the program as superuser in that session. Many warnings in the the luckybackup log indicating "chgrp not permitted".

    since this is similar to what happens when running rsync as user, perhaps there is a setting i'm lacking?

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,893

    Default Re: luckyBackup and file permissions confusion

    What you describe lets me doubt if it realy run as superuser. Did it ask for the root password? Yot could also check while this is running (I suppose it takes a while) with
    Code:
    ps -ef
    if the processes are owned by root.
    Henk van Velden

  3. #3

    Default Re: luckyBackup and file permissions confusion

    not that easy,

    from ps -ef

    root 14498 14492 0 12:58 ? 00:00:00 /usr/bin/luckybackup


    hence my confusion, is it possible that i'm running into a system-wide policy issue? this box has "easy" permissions in yast.

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,893

    Default Re: luckyBackup and file permissions confusion

    Hm, you could try if this preserve can be done by root on your system by using cp. Just copy a directory and its contents from the user to a place /tmp with
    Code:
    mkdir /tmp/preservetest
    cp -rp /home/<testuser>/<testdir>/ /tmp/preservetest/
    l /tmp/preservetest/<testdir>
    and check ownership, etc. in the destination.
    Henk van Velden

  5. #5

    Default Re: luckyBackup and file permissions confusion

    the cp -rp does the expected thing, all files retain their original permissions.

    So, your original statement being suspicious of actually being superuser seems more possible, thou i can't imagine starting luckybackup as superuser (which we previously verified) and it starting rsync as user... which would explain the situation, the child process not inheriting the permissions of the parent.

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,893

    Default Re: luckyBackup and file permissions confusion

    We proved that it is not a special policy or whatever.

    Back to the luckybackup process. It runs as root as you showed with the ps -ef | grep lucky. That means that is was either started from cron as root (roots crontab or one of the daily, ... directories), or you did so from a shell that was already run as root, or from a su/sudo. In the last cases you must have entered the root password.

    From what you tell in your last post luckybakup uses rsync. When luckybackup running as root starts rsync, rsync is also running as root (except when luckybackup does this different on purpose, which I doubt, why should they do this).

    I am using rsync from a script (based on rsnapshot, mentioned earlier) and it does preserve.

    When you say luckybackup uses rsync, rsync must also show in the process list. Again what about
    Code:
    ps -ef | grep rsync
    ?
    Henk van Velden

  7. #7

    Default Re: luckyBackup and file permissions confusion

    yields,

    root 21348 19509 3 21:59 ? 00:00:00 rsync -h --progress --stats -r -tgo -l -p -D --update --delete-after /home/ja

    which per the <-tgo> should retain the owner/perms of the original file to the backup file. This however is not the case.

    I'm stumped, using rsync 3.0.4, and after double-checking this should be working.

  8. #8
    goldie NNTP User

    Default Re: luckyBackup and file permissions confusion

    > rsync -h --progress --stats -r -tgo -l -p -D --update --delete-after /home/ja

    my man rsync (version 2.6.9 protocol version 29) says that -a
    replaces -rlptgoD which you have all of as separate switches...have
    you tried:

    rsync -h --progress --stats -a --update --delete-after /home/ja

    --
    goldie

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,893

    Default Re: luckyBackup and file permissions confusion

    In my own script I use
    Code:
    rsync -ax --delete --numeric-ids --relative --exclude=....
    I do not know if the --numeric-ids is needed in your case. I backup to another system where the usernames are not necesseraly known. When you backup to the same system you my not need it.

    Having same version as as goldie (on 10.3).
    Henk van Velden

  10. #10

    Default Re: luckyBackup and file permissions confusion

    thanks to you both for the advice, turns out that it was filesystem limitation (which i knew, but just didn't connect with what i was seeing)

    didn't mention that the destination was a 64GB usb key (vfat).

    hope somebody will read this and not make the same mistake.

Page 1 of 2 12 LastLast

Posting Permissions

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