Please help: Permissions-Deb12-Grub

Joined
Oct 16, 2023
Messages
30
Reaction score
2
Credits
332
Hello. So I made a mistake. I was trying to move a folder with several files inside from downloads in my home directory to the system-root directory and like other times I wanted to move/configure things I get that friendly message stating not authorized or don’t have permissions. This is using PACMN file manager. I’ve tried right clicking, going through the File-Edit-View etc top menu options can’t figure how to basically use super user/elevated privileges. Out out a bit of frustration and haste I opened Konsel and entered: sudo chmod 766 / and hit enter, system froze up. I believe I was trying to do 755? Basically with the hope and assumption that owner would still be root but I would also gain these privileges for performing said and like tasks.
I hard rebooted manually, gave it an hour and booted it. First go it seemed ok but upon getting to the os theme screen it stopped. I will add a couple pics of messages I had/have. First one is upon hitting esc. I’m able to get into the grub cmd line, to try to fix the permissions correctly and I had to stop and ask you fine people for assistance. These look blurry in preview. I can fix if needed.
Thank you
 

Attachments

  • A7BFB342-A89B-4CD7-98FE-32762B653DF2.jpeg
    A7BFB342-A89B-4CD7-98FE-32762B653DF2.jpeg
    2.1 MB · Views: 35
  • 9AE6C7A4-1037-4DCD-BD80-BD458BC196F0.jpeg
    9AE6C7A4-1037-4DCD-BD80-BD458BC196F0.jpeg
    1.4 MB · Views: 30


Do you have Timeshift set up, by any chance ?
 
Hello. So I made a mistake. I was trying to move a folder with several files inside from downloads in my home directory to the system-root directory and like other times I wanted to move/configure things I get that friendly message stating not authorized or don’t have permissions. This is using PACMN file manager. I’ve tried right clicking, going through the File-Edit-View etc top menu options can’t figure how to basically use super user/elevated privileges. Out out a bit of frustration and haste I opened Konsel and entered: sudo chmod 766 / and hit enter, system froze up. I believe I was trying to do 755? Basically with the hope and assumption that owner would still be root but I would also gain these privileges for performing said and like tasks.
I hard rebooted manually, gave it an hour and booted it. First go it seemed ok but upon getting to the os theme screen it stopped. I will add a couple pics of messages I had/have. First one is upon hitting esc. I’m able to get into the grub cmd line, to try to fix the permissions correctly and I had to stop and ask you fine people for assistance. These look blurry in preview. I can fix if needed.
Thank you
There's info missing from your query which would help, like actual distro version, dual boot or not, etc. I take it you meant the PCManFm file manager. Anyway, the following observations may help in relation to some of what you describe.
I was trying to move a folder with several files inside from downloads in my home directory to the system-root directory
That is, on the face of it, a very unusual move to make. It would benefit readers to understand why such a move would be made on your system.

can’t figure how to basically use super user/elevated privileges.
For superuser privileges you need to know the root password, or be a member of the sudo group in the /etc/group file.

I opened Konsel and entered: sudo chmod 766 / and hit enter, system froze up. I believe I was trying to do 755?
There is usually no reason to change the permissions of system files. If you changed the permission of root to 766, presumably you have the root password, or have permissions to use sudo, or both. It would help if you can say exactly what has been done with commands or in the GUI.

I suspect that the machine booted to the grub prompt because of the change of permissions to the root directory, but I haven't tested that. Grub does have conditions about the permissions of the files it needs to access.

When a machine boots to the grub prompt it usually means that grub can't find the files it needs to boot like in the root and boot partitions. Those files may be able to be found and lead to a boot by following some instructions such as those shown here:

However, if the only problem is to reverse the permissions of the root directory from 766 to 755, then you can use one of the methods described on this archwiki page in either methods 2 or 3 to get a root shell in the terminal:

While you in that rescue mode you can set or change your root password and also return the root directory to it's original permissions with a command like:
Code:
chmod 755 /
Then hopefully, a powercycle will boot into the system properly.
 
Last edited:
I wrote this article to help others with Grub.

Depending on the grub prompt, the Grub configuration files are either missing or Grub just needs to be re-installed. The initramfs-linux.img and the vmlinuz-linux images are the most important in the /boot directory. So cd into the boot directory.

 
There's info missing from your query which would help, like actual distro version, dual boot or not, etc. I take it you meant the PCManFm file manager. Anyway, the following observations may help in relation to some of what you describe.

That is, on the face of it, a very unusual move to make. It would benefit readers to understand why such a move would be made on your system.


For superuser privileges you need to know the root password, or be a member of the sudo group in the /etc/group file.


There is usually no reason to change the permissions of system files. If you changed the permission of root to 766, presumably you have the root password, or have permissions to use sudo, or both. It would help if you can say exactly what has been done with commands or in the GUI.

I suspect that the machine booted to the grub prompt because of the change of permissions to the root directory, but I haven't tested that. Grub does have conditions about the permissions of the files it needs to access.

When a machine boots to the grub prompt it usually means that grub can't find the files it needs to boot like in the root and boot partitions. Those files may be able to be found and lead to a boot by following some instructions such as those shown here:

However, if the only problem is to reverse the permissions of the root directory from 766 to 755, then you can use one of the methods described on this archwiki page in either methods 2 or 3 to get a root shell in the terminal:

While you in that rescue mode you can set or change your root password and also return the root directory to it's original permissions with a command like:
Code:
chmod 755 /
Then hopefully, a powercycle will boot into the system properly.
Thank you. So the reason why I thought to move files from downloads to the system root was I thought it was like C: drive. Not that I am a windows guy but lots are that we’re doing this. Has to do with Android platform tools so I can do some mods to a android phone/device.
So when I boot the computer it boots into a boot loader where if I press nothing it automatically loads into the OS. That being MX23 kde plasma. If I use arrows I can do other things like a memory test or load a different kernel. There the current one or one previous and within both the option to use systemd or not. I press e for edit, then F2 which gets me into the grub>
I ls each of the (hd) (gf,gpt) I found root at (hd6,gpt2) homeMX was in gpt 3 and in other hd’s I have two EFI, one EFI-SYSTEM, and three ext* but not that symbol it’s a larger star shape beside the ext. don’t have that on my phone. Hope this clarifies more. So I didn’t see a grub boot in any of them though.

Now what??
 
I think I did initially upon installation.
Is there any chance that it was keeping snapshots somewhere ?

Open Timeshift ....any snapshots listed there ?....

You could also look in settings/location/schedule
 
Is there any chance that it was keeping snapshots somewhere ?

Open Timeshift ....any snapshots listed there ?....

You could also look in settings/location/schedule
Firstly I thank you for your time and will to help. Not sure if you’ve read posts since original but as of now I am pretty much limited to the boot loader/grub. Within grub, at the grub prompt I have ran the ls -l -a located root/homeMX/several efi/EFI-SYSTEM and 3 ext.
So there it says root is in (hd6,gpt2)
But in the advanced settings perameters, ( where I guess I can append) it says root set to hd0 and many other things I don’t understand. I see one with systmd one w/o. I just need a clear understanding of what to input!
 
Firstly I thank you for your time and will to help.
That's perfectly ok. but, when I read the rst of your post above, my eyes glaze over.

I had a roughly similar occurence years back with Linux Mint.....and after bashing my head against the nearest hard surface, I decided then and there that I would not 1). Ever ignore Timeshift again, and 2). I would always have a full backup (not just timeshift, but in addition to it) also stored on an external drive

.......and, if this wasn't enough to save my hide, then a full reinstall followed shortly thereafter.

I hate full reinstalls....with a passion. i have enough to keep me busy without having to do all that repetitive work.

So, I will always look for a relatively simple solution to just about anything that pops up on the forum.......even including doing a reinstall via a recent Timeshift snapshot which has been saved correctly with /root and /home included in the snapshot

So what I am saying here (and taking a half page to say it is) wait for some of the brighter lads to come along and hopefully sort that tangle for you...----- or reinstall.

Some of the comments made may help in understanding exactly where you went astray.....so the mistake won't be repeated. (comments from @osprey, are particularly worth reading)
 
Latest screenshot from phone.
Zoom in to see… thx.
 

Attachments

  • 733C5508-A246-46F0-BC3C-F7EB073B6A63.jpeg
    733C5508-A246-46F0-BC3C-F7EB073B6A63.jpeg
    2.3 MB · Views: 17
Latest screenshot from phone.
Zoom in to see… thx.
Looking at the Menu Entry of your screenshot, your MX 23.4 and the kernel 6.1.0-29 is in place on your machine. Your fstab file should reflect that. The kernel reads the fstab file to boot your MX 23.

In post #7 you said you found root to be (hd6,gpt2). Your screenshot from your phone shows that root is set to: hd0,gpt2.
To be certain you should look at your fstab file and compare it to the output of blkid.

A few questions in order to understand so we can assist you.

Is MX 23.4 the only Linux distro on this hard drive? Are there other hard drives on this machine?

When your computer boots does it go directly to the command line showing the word 'grub_' ?
 
Last thoughts:

Using Timeshift like @Condobloke suggested would be easier for you to put into place; expecially if you are new to Linux.
You can enter into Timeshift from the command line if your system only boots to tty. I've done it before.

The articles that @osprey linked are helpful, I read through them.:)
 
Ok. Thx for taking the time to type all that out. The problem is that even though I did set up a time shift that is one of those things that doesn’t ever work right because I am not allowed to do certain things. It’s almost like Linux took my computer away from me. I’m on my 3rd distro now and still can’t just do what I need to do. I don’t do too much either. Sure in the cmd line I can sudo and can su but in the gui not so much. I’m a user, I own the machine I am the group I guess. Was on Mint last but it had its limits dealing with my sound interface not to mention I’m using almost 15 yr old hardware. I give up.
 
Looking at the Menu Entry of your screenshot, your MX 23.4 and the kernel 6.1.0-29 is in place on your machine. Your fstab file should reflect that. The kernel reads the fstab file to boot your MX 23.

In post #7 you said you found root to be (hd6,gpt2). Your screenshot from your phone shows that root is set to: hd0,gpt2.
To be certain you should look at your fstab file and compare it to the output of blkid.

A few questions in order to understand so we can assist you.

Is MX 23.4 the only Linux distro on this hard drive? Are there other hard drives on this machine?

When your computer boots does it go directly to the command line showing the word 'grub_' ?
Good grief. I already typed all that out.
When I press the power button it turns on.
It always has since I started with mx boots to an option screen. Normally I do nothing. But if I use the arrow buttons I then have choices.
Look, I thank you for trying to help but I hate typing on my phone as it’s all I got now. It’s old too! If I could post a video of the boot I would. I doubt that anybody would see it anyways.
I have 2 internal drives. Hdd & Sdd fusion. I have an external 1 tb Samsung t7 full of media mostly. All this info should be available in post or in my info.
I’m just so tired of Linux telling me I’m not allowed. I get enough of that as it is.
Thx for trying.
I’ve lost faith in any real help.
At least I can at least listen to podcasts on my phone. .
 
Ok. Thx for taking the time to type all that out. The problem is that even though I did set up a time shift that is one of those things that doesn’t ever work right because I am not allowed to do certain things. It’s almost like Linux took my computer away from me. I’m on my 3rd distro now and still can’t just do what I need to do. I don’t do too much either. Sure in the cmd line I can sudo and can su but in the gui not so much. I’m a user, I own the machine I am the group I guess. Was on Mint last but it had its limits dealing with my sound interface not to mention I’m using almost 15 yr old hardware. I give up.
You're welcome.
As the administrator of your own machine you should be allowed to do anything as you please with Linux anyway. I haven't ran Windows in 14 years so I don't know with that.

If you're having a permissions issue you can go into rescue mode and change your password and return the root directory to it's original state like @osprey said.

With 15 year old hardware you may want to try Anti-X or Puppy Linux.
Our member @MikeWalsh is exceptionally good with it.

As far as giving up.....I'm not one to give up so easily and often times, if there is 'something worth fighting for' I start by searching and asking questions so I can understand, gain knowledge and then find a solution.

I wish you the best.

Alex
 
Yeah, what's with this giving up thing ?

Hello. So I made a mistake. I was trying to move a folder with several files inside from downloads in my home directory to the system-root directory and like other times I wanted to move/configure things I get that friendly message stating not authorized or don’t have permissions. This is using PACMN file manager. I’ve tried right clicking, going through the File-Edit-View etc top menu options can’t figure how to basically use super user/elevated privileges. Out out a bit of frustration and haste I opened Konsel and entered: sudo chmod 766 / and hit enter, system froze up.

and there was your mistake....followed by whatever else you did

Get over it....get used to it. You screwed up.

Fix it.....and learn from your mistake.

How to fix?....Reinstall

Reinstalling an OS is not hard and is not time consuming.

""I’m on my 3rd distro now and still can’t just do what I need to do""

How sure are you that what you are "trying to do" can even be done ?....is the OS capable of doing what you wish to do ?

Has to do with Android platform tools so I can do some mods to a android phone/device.
if ever there was a task for windows....that would be it.

The problem is that even though I did set up a time shift that is one of those things that doesn’t ever work right because I am not allowed to do certain things. It’s almost like Linux took my computer away from me
What certain things?.....Again, how sure are you that what you want to do is within the capabilities of Timeshift.

All OS's and Software apps have rules....those rules are not going to change because you want them to

Learn how to use them....then they will be your best friends
 

Members online

No members online now.

Top