#Broken Permissions

51 messages · Page 1 of 1 (latest)

toxic lodge
#

Hi all,
OS: Manjaro

I was trying to update yay due to it malfunctioning, and when I tried I got a permissions error, so I decided to chmod the file to make it available to all, still some issues so I did it to the entire bin/ directory which managed to fuck up my Sudo access, since the system expects it to be owned by root

Here’s the command I used

Sudo chmod -R 777 /usr/bin/

Went looking for a fix, first idea was to use time shift the restore point tool, which didn’t work (refused to launch), second idea was to boot into safe mode to add a su password back and then try to fix the permissions but that’s where I’m lost

Any ideas what’s the best course of action and how?

#

I could just new system it

#

Switch over to arch completely

remote trench
toxic lodge
#

Yeah it mentioned something about that when I tried running Sudo

#

It also refuses me to login from the CLI because the password doesn’t authenticate

toxic lodge
jade zinc
#

I think the best approach for this would be to create a new installation and copy over /usr/bin from that new one to this borked system

toxic lodge
#

Basically the rationale was I’m the owner of this system and I trust that I know what I’m doing (obviously not)

jade zinc
#

chmod -R is a most dangerous command, system-breaker if you run it in the wrong place

#

In a way you're lucky that /usr/bin is just a dir, and doesn't go any deeper

toxic lodge
#

Needed a refresh anyways there’s a lot of mistakes made in this system

jade zinc
#

What was the error that caused you to run the chmod?

#

Just for curiosity really, there is/was probably a more appropriate way to tackle it

toxic lodge
#

I was doing makepkg-si

#

And it goes “you don’t own this directory, go home”

#

And since you can’t run makepkg in Sudo

jade zinc
#

Hmm not sure about that one, have to see it in action really

toxic lodge
#

I was grabbing the dart sdk, so I had to run some AUR stuff

#

Anyways system is basically fucked

jade zinc
#

Tbh, looking at my /usr/bin, it might be an easy fix

#

all the actual files are 755

jade zinc
# toxic lodge Anyways system is basically fucked

Up to you if you want to reinstall or keep trying at this, but based on what I can see on my system, try this;

find /usr/bin -type f -exec chmod 755 {} \;
``` That will chmod 755 every file in that dir (excluding symlinks)
toxic lodge
#

And would Sudo be required for this?

#

What about the setuid?

jade zinc
#

sudo would be required, yep. I tend to do sysadmin like this as root so I don't have to keep typing it over and over

jade zinc
jade zinc
toxic lodge
#

Could use a live usb

#

And set it from there?

jade zinc
#

Yeah via liveusb

#

You might be able to do this if you log in via root? Not sure, it might not like that

toxic lodge
#

Idk though, fresh install to get rid of the fuckery is appealing

#

Or I can go to arch full, see if I’m ready for that thing

jade zinc
#

I always see reinstalls as an admission of defeat 🙃

toxic lodge
#

What scares me most is that I may fuck up something in arch

toxic lodge
#

And there’s countless mistakes made in the install so

jade zinc
#

Most things can be fixed in linux, the question is whether it's worth the time or effort

#

That's for you to decide

toxic lodge
#

So I think it’s better to get a fresh install, atleast it happened when I no longer need my laptop for college

jade zinc
#

Do you have a separate home partition?

toxic lodge
#

No all in the one drive

#

No virtual drives

jade zinc
#

Separate home is nice in this situation. That gives you the freedom to nuke your root and reinstall it, while keeping all your data and config and other nice shinies in your /home

#

I could reinstall or switch distros with minimal effort

toxic lodge
#

Yeah that’s a neat addition actually

#

Friend uses endeavor, and did far more customization on it than I did

#

I was gonna do Hyprland

#

Then just stuck with KDE

#

Mind if I DM to discuss more? I’ve gone off topic