Results 1 to 7 of 7

Thread: Backup system files as normal user Deja Dup?

  1. #1
    Join Date
    Oct 2011
    Beans
    92

    Backup system files as normal user Deja Dup?

    Hi,

    I would to give a normal (no sudo) user the privileges to backup (but not modify) system files like /etc and so on. Deja dup haults on this as it says no permissions. Is there a way to create a group of users say 'backupers' that can do this, then add the desired user to it?

    Maybe then one could edit visudo, adding a line that allowed the user group to do this without password? Something like the following?

    Code:
    # Users in the backupers group are allowed to run back as root. 
    %backupers ALL=(root) NOPASSWD:/usr/bin/cp

  2. #2
    Join Date
    Oct 2011
    Beans
    92

    Re: Backup system files as normal user Deja Dup?

    anyone know? there is a backup group I noticed can this be used to do it?

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

    Re: Backup system files as normal user Deja Dup?

    there's really no reason to give permissions to those files, unless you modify them yourself, in which case you can change the permissions of that file to allow others to read it using:
    Code:
    sudo chmod a+r file
    (for all users)
    or
    Code:
    sudo chmod o+r file
    (for 'other' users - people who aren't owners or members of the owner group of the file)

    you could also add those people to the group that owns the file (and set the group of the file to something other than root)
    Code:
    sudo chgrp group file
    sudo usermod -a -G group user
    Last edited by HiImTye; October 8th, 2012 at 10:02 PM. Reason: group permissions

  4. #4
    Join Date
    Oct 2011
    Beans
    92

    Re: Backup system files as normal user Deja Dup?

    Thanks,

    I want it so that the normal user can only read and copy the directory, not modify it. Wouldn't giving them ownership allow them to do whatever with the system files?

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

    Re: Backup system files as normal user Deja Dup?

    yes, so just use one of the first two options, using chmod
    well, not necessarily, you can set 'group' permissions separately, but if you just want a one liner, use one of the other ones

    for using group, without write permissions
    Code:
    sudo chgrp group file
    sudo chmod g=rX file
    sudo usermod -a -G group user
    Last edited by HiImTye; October 9th, 2012 at 09:45 AM. Reason: practical example using groups

  6. #6
    Join Date
    Oct 2011
    Beans
    92

    Re: Backup system files as normal user Deja Dup?

    thanks, so is it not sufficient to have read permissions to copy a file? even if I'm gonna write it in my home directory say?

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

    Re: Backup system files as normal user Deja Dup?

    it is sufficient to have read permissions, but some files that you may want to copy also have the execute flag, so it will preserve the flag if it exists. I'm not sure how it would work copying a file that has the execute bit set if you don't have execute permissions, it might remove the execute bit, forcing you to have to set it manually. it's up to you, really, I was just thinking ahead to other problems. generally you shouldn't need to copy anything outside of /home/ or your storage directories, anyway. this whole situation is rather strange.

Tags for this Thread

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
  •