You are not logged in.

#1 2016-10-20 19:51:19

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

[SOLVED] Ownership of files in ~/

Is there any reason for files in ~/ to be owned by anyone except the user? After recently managing to fix a dbus/session problem (which effectively meant recreating a bunch of stuff in ~/.config) and moving stuff backwards and forwards to isolate the problem, there's a mass of stuff in ~/.local/shape/applications (and I dare say other stuff) owned by root. Is it safe to chown them all back to my user, or is this normal and I just never noticed?

Last edited by Roken (2016-10-22 09:39:05)


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#2 2016-10-20 20:00:49

scar
Member
From: Hungary
Registered: 2009-10-01
Posts: 442

Re: [SOLVED] Ownership of files in ~/

No, normally files like .local/share/apps/APPNAME should be owned by the user.


“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson

Offline

#3 2016-10-20 20:06:02

frostschutz
Member
Registered: 2013-11-15
Posts: 1,418

Re: [SOLVED] Ownership of files in ~/

stuff owned by root in your home usually happens when you mess things up by being root... for example starting firefox as root (while homedir is set to your users home) and such things.

that or you copied files without preserving permissions and timestamps (never just cp, always cp -a)

Last edited by frostschutz (2016-10-20 20:06:52)

Offline

#4 2016-10-20 20:24:31

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,860
Website

Re: [SOLVED] Ownership of files in ~/

Mod note: not an application/DE issue, moving to NC.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2016-10-20 20:34:48

Daerandin
Member
From: Norway
Registered: 2013-05-07
Posts: 259
Website

Re: [SOLVED] Ownership of files in ~/

This is likely caused by running graphical applications with sudo. If you need to run graphical applications as root, you should always do so with gksudo, never with sudo.

Offline

#6 2016-10-20 22:00:39

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: [SOLVED] Ownership of files in ~/

I never run graphical applications with sudo, but my attempt to fix has just almost killed my system. $USER has taken ownership of most files on the system. Now setting them all to root, except ~/ files, and I'll fix up individual files across the filesystem as I go. It just goes from bad to worse lately, and the only error sits between the chair and the keyboard sad

EDIT: For clarity, beware of *

Last edited by Roken (2016-10-20 22:01:45)


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#7 2016-10-21 13:07:42

Starfish
Member
From: Germany
Registered: 2015-10-21
Posts: 134

Re: [SOLVED] Ownership of files in ~/

Have you tried 'lsof' to check what applications are currently accessing the files?


"Yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the present." - Master Oogway

Offline

#8 2016-10-22 09:38:46

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: [SOLVED] Ownership of files in ~/

Unfortunately it went from bad to worse. After updating I ended up with a non booting system (Failed to execute /init). Passing init at grub didn't help, and I was starting to think of backing up /etc, creating a list of installed packages and starting from a clean install. However, as a last ditch try I chrooted in and reinstalled all packages. This had the added bonus of fixing most permissions and owners. Rebooted and I'm back.

I still had a couple of permission issues (SUID on beep and ownership problems with chrome and virtualbox) which I've fixed. I dare say I'll come across more in the fullness of time, but I can fix the odd file. At least I don't have to fix the whole system again.

I'm going to mark as solved.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

Board footer

Powered by FluxBB