Need help unbricking my tumbleweed install


I have made a mistake and I changed my harddrive to be owned (in terms of permissions) by one of the 2 users on my PC instead of it being owned by root.

The problem has arisen that when my pc turns on, it automatically logs in to the other account that wasn’t given the permissions, and it throws up a bunch of dialogue boxes saying the config files aren’t writeable (for things like x11, plasma, all the essentials) and then it freezes after a minute.

Basically I need to undo my monumental mess up of changing the harddrive to be owned by user. (I did this via Konsole, sudo chown -R Jess / )

Also for future, would love to know how I’m meant to copy a folder/create one on my harddrive the correct way :slight_smile:

Welcome to the forum!

sudo chown -R Jess /

That command that you used throws data away, where before different folder/before were owned to different user they are now owned by one and the same user. There is no way to undo this.

Do you have an backup? If so, revert to a backup before the change.

Otherwise I see reinstalling things as the only option.

would love to know how I’m meant to copy a folder/create one on my harddrive the correct way

Easy enough in Dolphin, right? Right click on the directory you want to copy, select copy, navigate to the folder under the which the copy should come and paste.

One advice: Do not things as root (sudo) that you are not sure what they are doing.

Damn reinstalling is what I really hoped to avoid :frowning:

As for copying, it wasn’t letting me copy anything into there or create new folders using dolphin, I assumed it was due to lack of permissions.

I haven’t created a backup :frowning:

I believe the question of the TO was how to copy a file to a directory where he don’t have write permissions. For this you need sudo or su -.
But instead using sudo only for the copy command he tried to change the permissions on the complete base directory /. That will fail as can be seen…

If you want to copy files or create directories into a path where you don’t have write permissions you need the relevant copy/create commands as sudo:

Example for copy with sudo:

sudo cp /home/you/ /opt/

Example for creating a directory with sudo:

sudo mkdir /opt/yournewdirectory

Changing the ownership of a directory or file to be able to write into it are basic beginner errors. You will learn how to edit a file owned by root as example with terminal editors that can be run as root/sudo. And also how to invoke sudo to get elevated rights to do stuff like creating new directories/files.

1 Like

Is there a way of copying like that with GUI? I really like to avoid the Konsole at all costs, personal preference and clearly not to be trusted with it :stuck_out_tongue:

There is a graphical way but it is way more dangerous. Normaly, if you use terminal commands, you type, read it to verify and execute the command afterwards. So you have some control steps in between you hit execute…

But if you insist on using the GUI, openSUSE provides “File manger-Super user mode” at least for KDE Plasma…

1 Like

IMHO you should re-think why you are wanting this.

When you, as an end-user (not root) wants to copy something into a directory owned by another user and that user did not give the needed permissions, you should contact that other user. Maybe (s)he wants to change the permissions in a way that allow you to do what you want. But the other user will of course only allow you if (s)he trusts you and the action you want to perform.

That is how the security model in Unix/Linux is.

And asking root to do the action for you (as suggested above) might perhaps be something that root does not want to do for you. root also is responsible for it’s actions to it’s users.!

I’m the only user I just have two accounts on there, it’s my pc so I am root :stuck_out_tongue:

I’m the only user here. I have three accounts (one for KDE, one for Gnome, one for ICEWM). But I would never say “I am root”. I would say that I am system administrator.

Clearly I have a different attitude toward the root account than you have. In particular, I am more cautious about what I do as root.

Fair enough, I guess that’s the Windows learning curve I need to overcome!

I am not talking about you as a person. The system does not know you as a person. The system only knows users. And it is designed to protect users from each other.

It is only an advice. But you may of course treat your system as you like. But then be prepared for more situations like you created with your chown command.

1 Like

Oh no I more meant I consider myself root but it seems like that is the won’t way of thinking about it?

You may be person that does everything with the system (and maybe even owns it), or the one that only manages it, or you may be the system manager (yes, you are because you know the password of user root) and at the same time you may also be one or more of it’s (end-)users (the ones that use the system for useful purposes like mailing, browsing, developing software, …), but that is of no importance to the system. The system only knows users (of which there are more then 20 on your system, although not all of them are really active ones).

And yes, it is a good idea to have more users when you have more people then just you that must be able to use the system (partner, spouse, …) or for different roles you have (personal work with banking, mail, etc. vs. being treasurer of a football club, just to give an example). All those different end-users have there own environment (in their home directory) where they have their own data and configurations (e.g. for their desktop) and that environment is protected by the (rather simple) mechanism of user/group vs. protection bits for user/group/world.

This is one of the basics about Unix/Linux (a multi-user/multi session operating system) that you should understand. Even if you think “I am the only one here on the system”, the rules of the system are still rules and not understanding them will bring you many surprises. :wink:

1 Like

I usually use “sudo Nautilus” to open the Gnome file mamager with root permissions.
I needed this to copy new “time of day changing Backgrounds”.
If I am not mistaken some file managers allow you to open a directory as root or open the file manager as root with the right klick menu. Not Gnome’s Nautilus.