I moved my ubuntu installation from my HDD to my SSD, but now my permissions seem to be messed up.. For example; i can't run my installed Chrome browser anymore, and running sudo gives me the sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set error.
I've used this manual to move my installation to my SSD; https://askubuntu.com/a/40454
Any idea what's going wrong?
I've also already tried to reboot in recovery mode and chown / chmod the /user/bin/sudo file / directory as root..
Edit:
As i said, i've used this manual to move my installation to my SSD: https://askubuntu.com/a/40454
The instructions were as follows:
1) Copying files
You want to copy the FILES, not the whole partition ( including its free space ), so you don't need to resize the partition first. Boot from the livecd and mount both the HD and SSD ( after formatting a partition on the SSD of course ), then copy all of the files over:
sudo cp -ax /media/hd /media/ssd
Use the correct names for the hd and ssd mount points of course. Then you just need to edit the /etc/fstab on the ssd to point to the new fs UUID ( you can look it up with blkid ). Finally you need to install grub on the ssd.
2) Dealing with GRUB
a) Command line:
sudo -s
for f in sys dev proc ; do mount --bind /$f /media/ssd/$f ; done
chroot /media/ssd
grub-install /dev/ssd
update-grub
Of course, use the correct device for /dev/ssd. The whole disk, not a partition number.
b) "Recommended repair" magic button in Boot-Repair:
https://help.ubuntu.com/community/Boot-Repair
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
Finally reboot and make sure your bios is set to boot from the SSD.
/usr/bin/sudo
should always be owned byroot
alias 'uid 0'. How did you move the installation from HDD to SSD? Which method/tool? You seem to have messed with the file ownership (maybe also with the permissions. If you still have a working system on the HDD, you are safe, and can try with a better method. Please edit your original question to explain with as many details as possible what you have and what you have done. – sudodus May 03 '18 at 09:59sudo cp -a
should preserve the ownership and permissions, if you have a target file system that can manage linux ownership and permissions. What file system is there in the target partition? – sudodus May 03 '18 at 13:12ntfs
is a Microsoft file system, and it does not manage linux ownership and permissions. Create anext4
file system in the target partition, and it will work better. Good luck :-) – sudodus May 03 '18 at 14:18