sudo nautilus is a bad, bad, bad, idea. Don't run GUI programs under sudo. There are repercussions. Perhaps not at the time, but later. You will uncover those.
Whenever making backups, we need to be aware of the target file system support for POSIX and we need to be cognizant about maintaining the owner, group, permissions, ACLs and xattrs along with the actual data. If those other aspects of the file are lost, then we don't have a backup. We just have raw data. NTFS and FAT32 and exFAT don't support any of the extra file data we need. In fact, they don't even support the same names for files and directories.
Summary:
- Don't use sudo with any GUI program.
- When making backups and when restoring backups, use tools that retain the owner, group, permissions, ACLs and xattrs along with the actual data.
- Don't use NTFS, fat32, exfat for backup storage.
*@$# - there are always exceptions, but for now, until you understand more, just don't.
Backups can be as simple as using sudo cp -rp or sudo rsync -avz or using a real backup tool with sudo (just not a GUI). Some programs in the menu system will elevate privileges using alternatives to sudo, which are safe. Many GUI backup programs are only supposed to be used for 1 user's HOME and for that, it isn't too bad, provided non-native file systems aren't used. You can attempt to fix all the files in your HOME using this command:
Code:
sudo chown -R $USER:$USER $HOME
That should be safe, provided you didn't go crazy using sudo name-of-gui-program with too many different programs. Don't use sudo with file managers. Just don't.
I think in 21.04 and later, Canonical altered the default behavior of sudo so the HOME directory will be set based on the new, elevated, userid .... this will be helpful and make using sudo with a GUI not-so-dangerous.
Bookmarks