Messed up my home permission using deja-dup file restore
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Messed up my home permission using deja-dup file restore
Oh boy did I mess things up, I ran deja-dup as root and created a backup of my /home/odroid and then my xserver crashed, I was able to recover however since my laptop's screen is busted, I only have the external monitor via hdmi hooked up. I was able to login blind, I just typed in my password on a empty screen with the ubuntu logo, the login screen was on my laptop but I can't see it cause it's broken. Anyway I was able to open a terminal using mouse right click and then I did sudo deja-dup and I got the deja-dup screen, and I used the backup I created before the xorg crash. Ever since then all my programs run as root, here is a ls -la from my home directory
odroid@odroid:~/.config$ ls -la
total 176
drwxr-xr-x 37 odroid odroid 4096 Mar 15 07:24 .
drwxr-xr-x 37 odroid odroid 4096 Apr 24 17:19 ..
drwxr-xr-x 2 odroid odroid 4096 May 7 2018 autostart
drwx------ 14 odroid odroid 4096 Jan 2 2019 brave
drwx------ 3 odroid odroid 4096 Jan 14 2019 BraveSoftware
drwxr-xr-x 3 odroid odroid 4096 Apr 24 21:41 caja
drwxrwxr-x 2 odroid odroid 4096 Nov 14 2017 Clementine
drwxrwxr-x 2 odroid odroid 4096 May 11 18:25 dconf
drwx------ 7 odroid odroid 4096 May 11 18:26 deluge
drwx------ 2 odroid odroid 4096 Oct 29 2017 enchant
drwx------ 3 odroid odroid 4096 Oct 30 2023 evolution
drwxrwxr-x 3 odroid odroid 4096 Oct 11 2017 folder-color
drwxr-xr-x 2 odroid odroid 4096 Mar 10 2018 gedit
drwxr-x--- 2 odroid odroid 4096 Oct 30 2023 goa-1.0
drwx------ 2 odroid odroid 4096 May 11 17:05 gtk-2.0
drwx------ 2 odroid odroid 4096 Oct 11 2017 gtk-3.0
drwx------ 6 odroid odroid 4096 Apr 27 23:53 hexchat
drwxr--r-- 2 odroid odroid 4096 Oct 12 2017 htop
drwx------ 3 root root 4096 Oct 30 2023 ibus
drwxr-xr-x 2 odroid odroid 4096 Jun 27 2018 libaccounts-glib
drwxrwxr-x 3 odroid odroid 4096 Oct 11 2017 libreoffice
drwx------ 4 odroid odroid 4096 Mar 10 2020 mate
drwxrwxr-x 3 odroid odroid 4096 Oct 16 2017 mate-menu
drwxr-xr-x 3 odroid odroid 4096 Oct 12 2017 mate-session
drwx------ 3 odroid odroid 4096 Oct 17 2017 menus
-rw-rw---- 1 odroid odroid 3555 Jan 7 22:48 mimeapps.list
-rw-rw---- 1 odroid odroid 1739 Oct 17 2023 monitors.xml
-rw-rw-r-- 1 odroid odroid 89 Oct 13 2017 pavucontrol.ini
drwxrwxr-x 3 odroid odroid 4096 Oct 11 2017 plank
drwxr-xr-x 2 odroid odroid 4096 Nov 5 2023 pluma
drwx------ 2 odroid odroid 4096 Oct 18 2023 pulse
drwxrwx--- 2 odroid odroid 4096 Oct 25 2023 qBittorrent
-rw-rw---- 1 odroid odroid 113 Oct 8 2023 QtProject.conf
drwxrwxr-x 2 odroid odroid 4096 Oct 11 2017 synapse
drwxrwxr-x 2 odroid odroid 4096 Nov 11 2023 tilda
drwx------ 5 odroid odroid 4096 May 11 18:23 transmission
drwx------ 2 odroid odroid 4096 Dec 24 22:29 transmission-remote-gtk
-rw-r--r-- 1 odroid odroid 4077 Nov 14 2017 Trolltech.conf
drwxrwxr-x 3 odroid odroid 4096 Oct 11 2017 ubuntu-mate
drwx------ 2 odroid odroid 4096 Oct 11 2017 update-notifier
-rw------- 1 odroid odroid 632 Oct 11 2017 user-dirs.dirs
-rw-rw-r-- 1 odroid odroid 5 Oct 11 2017 user-dirs.locale
drwxrwxr-x 2 odroid odroid 4096 May 31 2019 vlc
drwxrwxr-x 2 odroid odroid 4096 Nov 15 2017 yelp
As you can see transmission is run as root and all my external hard drives mount themselves as root
Quote:
odroid@odroid:/media/odroid$ ls -la
total 4616
drwxr-x---+ 21 root root 4096 May 11 18:10 .
drwxr-xr-x 3 root root 4096 Jan 30 2023 ..
drwx------ 1 odroid odroid 131072 May 11 14:05 Backup
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies1
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies10
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies11
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies12
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies13
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies14
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies15
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies2
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies3
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies4
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies5
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies6
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies7
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies8
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies9
drwx------ 1 odroid odroid 262144 Jan 1 1970 Movies and
drwx------ 1 odroid odroid 131072 May 11 18:12 Mushkin
drwx------ 1 odroid odroid 262144 Jan 1 1970 SamsungTV
I tried editing /etc/fstab but none of the external drives are listed in there
Quote:
odroid@odroid:~$ sudo cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=c5465792-5db5-4e8f-9a55-f88e549ff30c / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=D836-8E85 /boot/efi vfat umask=0077 0 1
# swap was on /dev/sda3 during installation
UUID=fbaccbc0-144d-4e3a-a2a7-ba18f59cca5e none swap sw 0 0
I am at a loss. I have a spare laptop, the same exact model, I was thinking of swapping out the nvme from the broken one into the other one so I could see the login screen so I could create a new user but that's a last resort, can you guys help me?
That should reset the ownerships in your home folder.
That solves half the problem, I have programs in my home folder which transfer data to my external drives which are mounted as root so once I run the command I will be in trouble any ideas as how to get my externals to mount with write permissions as normal user, as they aren't even mounted in fstab.
Assuming they are linux partitions you mount then chown the mountpoint as well. Just be careful to target the mountpoint and not the whole installation.
Assuming they are linux partitions you mount then chown the mountpoint as well. Just be careful to target the mountpoint and not the whole installation.
The external hard drives are Exfat and every time I reboot their /dev/sd# changes, so that's a problem, is there a one solution to mount them as read and write, this problem only started when I used deja-dup as root to restore my /home partition and a few others, I don't remember which but I remember one was /var Am I really screwed here guys, I can always backup my most needed programs in .config directories and after a reinstall just move them into place once I installed the programs. But that is the nuclear option. As it stands now , my installation runs, but as root, I don't use it to browse, only to watch movies and TV shows. I use iptables instead of that frontend program that comes installed with Ubuntu, I prefer cli control over my iptables. I block http and https and ssh ports and a few others, I am connected to a Linksys 3200acm WRT with dd-wrt installed on it via eth0 not wifi. Boy did I screw this up
Mounting drives via /dev/sd* is not a good idea for exactly this reason. You need to use UUID's for regular partitions to be guaranteed a consistent mount every single time.
This should be in your fstab for each drive. You need to supply the proper UUID of course. Then every time you mount the drive it will always mount in the same place.
It will self mount when a process accesses the mountpoint and then umount itself after 30s of no activity. Once you have a consistent mountpoint it should work.
Now that being said it really depends on how you used DejaDup. While some report it working great for system files that is not it's intended purpose. You should be using something like timeshift for system backups. Dejadup is very much a user tool. Can be used for system but far more complicated to get than for user files. Since you aren't clear on basic mounting (and I'm not being mean or rude I hope, just honest) then it's very likely you may have blasted or lost a fair number of permissions in your /var directory if that is one you did. To say nothing of the others. I firmly believe this is a good time for you to backup any user data and reinstall to have a clean slate fresh slate to start from. Then create a timeshift backup. Then do whatever you are trying to do. Worst case you can reload the timeshift snapshot if necessary. Then look into the above fstab lines for your backup externals. And don't use /dev/sd* if you can help it, there really is little to no reason to do it these days.
Last edited by jmgibson1981; 05-13-2024 at 06:11 PM.
Mounting drives via /dev/sd* is not a good idea for exactly this reason. You need to use UUID's for regular partitions to be guaranteed a consistent mount every single time.
This should be in your fstab for each drive. You need to supply the proper UUID of course. Then every time you mount the drive it will always mount in the same place.
It will self mount when a process accesses the mountpoint and then umount itself after 30s of no activity. Once you have a consistent mountpoint it should work.
Now that being said it really depends on how you used DejaDup. While some report it working great for system files that is not it's intended purpose. You should be using something like timeshift for system backups. Dejadup is very much a user tool. Can be used for system but far more complicated to get than for user files. Since you aren't clear on basic mounting (and I'm not being mean or rude I hope, just honest) then it's very likely you may have blasted or lost a fair number of permissions in your /var directory if that is one you did. To say nothing of the others. I firmly believe this is a good time for you to backup any user data and reinstall to have a clean slate fresh slate to start from. Then create a timeshift backup. Then do whatever you are trying to do. Worst case you can reload the timeshift snapshot if necessary. Then look into the above fstab lines for your backup externals. And don't use /dev/sd* if you can help it, there really is little to no reason to do it these days.
Ok I get what you are saying, one minor detail, the externals aren't ext4, they are exfat, what do I put in fstab for a exfat drive ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.