Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help with permissions problem I've created part 2 [UNSOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 548
Location: Hawaii

PostPosted: Sun Jan 20, 2019 6:22 am    Post subject: Help with permissions problem I've created part 2 [UNSOLVED] Reply with quote

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
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sun Jan 20, 2019 12:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sun Jan 20, 2019 1:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Sun Jan 20, 2019 4:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 548
Location: Hawaii

PostPosted: Tue Jan 22, 2019 5:55 pm    Post subject: Reply with quote

I've gotten part of the way but have hit a snag. 'emerge @system' went fine, and most other packages emerge fine, except for USE requirements or keywording, which I can handle. Numpy, however has some major issues which are indicative of some problems with my system. Help would be appreciated:

entire 'emerge numpy' output
https://paste.pound-python.org/show/oH4yrymyPe0u8Kgepmt0/

'emerge --info'
https://paste.pound-python.org/show/zyO7xpn62iV216B702JL/

'eselect python list'
https://paste.pound-python.org/show/75oAx4sRBjJE2M0L38Al/

'/etc/portage/make.conf'
https://paste.pound-python.org/show/I9EypEd9xnFHyMDf6tra/

'emerge -pqv numpy'
https://paste.pound-python.org/show/7fCgmSh6l9APMoSqoAcP/

Anything else I can provide?
_________________
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....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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