View previous topic :: View next topic |
Author |
Message |
bammbamm808 Guru
Joined: 08 Dec 2002 Posts: 548 Location: Hawaii
|
Posted: Sun Jan 20, 2019 6:22 am Post subject: Help with permissions problem I've created part 2 [UNSOLVED] |
|
|
Long story short: I ended up in chroot, backing up my / and efi system partitions, compleetely wiping the disk they were on, creating a new partitions table and partitions from scratch, and copying everything back, rerunning 'efibootmgr' and the restored systme boots, with all data present. The problem is that when moving all that data back and forth, I used cp -r instead of cp -a. Now I cannot 'su' or lauch X as root or user. Is there a solution of manageable scope, or shoud I just restart with a stage3 and re-emerge my world?
EDIT: Your answers have confirmed what I I tbiught. While a repair is possible, it is not quick or easy. I ended up doing a new stage 3 and saving important conciguration files. Quick and much more certain. All I have left is uzer creation and 'emerge -e @world'.
Thanks for your replies. _________________ MSI MAG B550 Tomahawk
Ryzen 3900x
32Gb Samsung B-die (16GB dual rank x2) DDR4 @ 3200MHz, cl14
Geforce RTX 2070S 8GB
Samsung m.2 NVME pcie-3.0
Etc....
Last edited by bammbamm808 on Tue Jan 22, 2019 6:18 pm; edited 3 times in total |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Sun Jan 20, 2019 12:30 pm Post subject: |
|
|
You could try to manually adjust owners and permissions of the files on your root partition. But it's extremely hard to get it right.
I think I would make a backup of the affected partitions (using tar), reformat them and start over with a stage3 image. As soon as the base system runs, I would carefully restore some cherry-picked files like /var/lib/portage/world and configuration files in /etc from the the tar backup and adjust permission and owner/group of those files manually. After that, I would run 'emerge --update --deep --newuse -av @world' to get my world back. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Sun Jan 20, 2019 1:24 pm Post subject: |
|
|
You could pretty much change everything in /etc, /bin, /lib, /usr/bin, /usr/lib, /sbin, /usr/sbin to root:root for a start then work on things from there
With these changed from root/root https://paste.pound-python.org/show/C7Il252DG5M6TJBndy2Q/
That should get you close
Edit to add: And these for odd permissions
-rws--x--x root root /bin/su
-rws--x--x root root /bin/passwd
-rws--x--x root root /bin/mount
-rws--x--x root root /bin/umount
-rws--x--x root wheel /usr/bin/netselect
-rwsr-s--x root root /usr/bin/procmail
-rwsr-s--x man man /usr/bin/mandb
-rwsr-s--x man man /usr/bin/man
-rws--x--x root root /usr/bin/newgrp
-rws--x--x root root /usr/bin/newgidmap
-rws--x--x root root /usr/bin/chage
-rws--x--x root root /usr/bin/gpasswd
-rws--x--x root root /usr/bin/chfn
-rws--x--x root root /usr/bin/chsh
-rws--x--x root root /usr/bin/expiry
-rws--x--x root root /usr/bin/newuidmap
-rws--x--x root root /usr/bin/atop
-rws--x--x root root /usr/bin/sudo
-rws--x--x root root /usr/bin/Xorg
-rws--x--x root root /usr/bin/fusermount
-rws--x--x root root /usr/sbin/rscsi
-rws--x--x root root /usr/lib64/misc/ssh-keysign
-r-s--x--x root root /usr/libexec/lockspool _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21607
|
Posted: Sun Jan 20, 2019 4:47 pm Post subject: |
|
|
If you have a working Linux system (this includes the rescue CD), you could use its permissions as a reference point for any files they have in common, such as most of /bin, /usr/bin, etc. If you saved tbz2 files of packages as you built them, those will remember the real permissions as part of the tar metadata. You could reinstall those through emerge --usepkgonly or extract the permissions from them and apply the permissions outside Portage.
If none of those are viable options for you (e.g. if your rescue CD is so minimal that you cannot discover enough critical permissions from it), you could ask someone to follow Anon-E-moose's example and post a list of all files that have unusual permissions. If you do, please post a list of packages for which you want permission information, so that we know which packages you need to see. It wouldn't be sufficient for you to have a GNOME user post permissions if you are a KDE user, for example. We could start by saying that anything in /bin, /usr/bin, etc. is unusual if it is not mode 0755 and anything in the data directories is unusual if it is not 0644. That should minimize the lists to post. |
|
Back to top |
|
|
bammbamm808 Guru
Joined: 08 Dec 2002 Posts: 548 Location: Hawaii
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|