0

I installed Xubuntu on a friend's PC and he understood, that is it greater than Windows 10. He has no practice with shell and dont want to use it! The PC is used by several people. He (the owner) is doing weekly backups. Is it possible to copy the whole home dir without root? I dont want, that he is working to much while he is root, so i tried to add a group called "home" and chown -R :home /home and chmod -R g+w /home, but it is not possible to copy other users homedirs. A easy solution is to create a shortcut, which opens the explorer with root, but this is also very dangerous.

Edit: I was able to read and write to the other dirs, but I couldnt copy them without root.

A possible fix is a rx-only script, so he has just click on it. ´sudo copy -R /home /media/[user]/foo´ Is it possible to show a progressbar and the time remaining?

Edit: Thats not really a duplicate. He can read and write to other homedirs, but not copy them


Solution: I created a readonly script, which looks, if the hdd is mounted and askes, if the pc should shutdown afterwards and I created a alias "backup=sudo /path/to/backup.sh"

3
  • Editing the question to say it's not a duplicate won't really help. Look at the answers to the suggested duplicate, and if they do not answer your issue you need to reword your question to make it clear that yours is different. (You could perhaps reference the other question and say you've looked at it but it doesn't help you because ...) I must say that from here your question still looks like a duplicate - being able to read a directory and its contents means you can copy it.
    – roaima
    Apr 16, 2016 at 19:13
  • Maybe that was a bug, but i could not copy the files, but i could read them
    – Motte001
    Apr 16, 2016 at 19:31
  • There's also no point in responding within the comments (although I personally appreciate the reply). If you want your question to be addressed you need to review and update it like I've suggested. Or create a new one that is sufficiently different for it also not to be tagged as a duplicate of this one. I have no doubt that Stack Exchange will be able to help you, but you have to work within its rules and expectations - just like you would for a forum.
    – roaima
    Apr 16, 2016 at 20:56

1 Answer 1

2

You could create a script to do that backup and either

  • run it automatically via cron
  • or give his user the possibility to run only that script via sudo (if you want it secure, make sure he can only read and execute the script, if he could edit, he could easily get more rights.)
2
  • Thats possible, but I dont know, how to copy to right hdd. It could be /dev/sdc or maybe /dev/sdd. How can I handle this?
    – Motte001
    Apr 16, 2016 at 18:38
  • There is either a auto mounter, that usually uses the volumes name for the destination directory or if you mount manually, you can use the uuid of the partition. (help.ubuntu.com/community/…) Apr 16, 2016 at 18:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.