Page 1 of 1

folders that only root can access SOLVED

PostPosted: Aug 13th, '17, 02:15
by roly
I have login as root and changed the user to my self but when I log back in I still cannot access cetain folders. Even when I check them again as root they are unchanged.
I see a bunch of references to polkit etc. but none seem to apply to my problem.
Sorry bother anyone.
roly

I downloaded a iso of mageia6 and did a local install, now all is goog

Re: folders that only root can access

PostPosted: Aug 13th, '17, 03:44
by doktor5000
You may want to share at least ls -al output on those so others can see what it looks like and you should comment what you expect.
Also mention the underlying filesystem please.

Re: folders that only root can access

PostPosted: Aug 13th, '17, 06:47
by gohlip
I still cannot access cetain folders.

'Access' and 'Write into' are different.
You should be able to 'access', but if you mean you cannot 'write into' certain files, that's because some guy in KDE made changes so that it cannot be done.
Some distros have made changes such that it can be bypassed.
Finally KDE relented with some convoluted way to do it (pleasing no one).


To be able to write into (change) some system files, the command (using kate as an example) is
Code: Select all
SUDO_EDITOR=kate sudoedit <file>


Using kwrite and making changes to /etc/default/grub, the example will be

SUDO_EDITOR=kwrite sudoedit /etc/default/grub

Re: folders that only root can access

PostPosted: Aug 13th, '17, 14:58
by doktor5000
gohlip wrote:that's because some guy in KDE made changes so that it cannot be done.
[...]
Finally KDE relented with some convoluted way to do it (pleasing no one).

This has a certain tone to it, as if what he did would be a bad thing - he (and everybody else should, too) cares about system security, and hence that graphical applications should not be run as root, period.
You should probably read up on the topic, see https://blog.martin-graesslin.com/blog/ ... s-as-root/ and maybe https://conf.qtcon.org/system/attachments/105/original/security.pdf?1473018986 to understand the implications. Seems that you don't care that any application could run itself as a keylogger, take over your X session or your whole box, and there's nothing you can do against that as long as you run X. This problem is also not restricted to KDE.

Because if that continues, giving in to ramblings of users "I need to run dolphin/kate/whatever as root" we would end up in a situation where everything just runs under root and chmod 777 is the fix for all permission issues, like back in the dark days. Basically the same starting point that lead to windows systems becoming the biggest malware victims and even redistributed them, because there is no regular user, only an administrator account. And all that purely out of convenience of users - sorry but that just needs to stop.

And if the argument would be "but freedom - I want the freedom to run everything as root" - then the argument is flawed. You have the freedom to grab the source code and modify it as you please.

Sorry, just had to put that out there.

Re: folders that only root can access

PostPosted: Aug 13th, '17, 15:14
by gohlip
Come on. It's understandable not to allow users to run dolphin as root. I've said several times in the past here not to do it.
But not being able to change /etc/default/grub or /etc/fstab? Shirley, you must agree this is wrong.

Sure, finally we can do it but with that "SUDO_EDITOR=kate sudoedit <file>"?
And most, except Mageia, allows to do a a simple 'kate' and to input password to save.
Are we saying they are wrong?
And we just want to follow blindly?

The argument is not freedom or lack of. Just that we must always do what's correct and not just "toe the line".
And sure, there are enough examples we do just that.

ps: I'm not sorry you put it out here.
Gives me a chance to rebut.

Re: folders that only root can access

PostPosted: Aug 13th, '17, 15:31
by richardwest
urpmi kde-rootactions-servicemenu

then right click in dolphin, "Root Actions" > "Open as Text"

What's the problem?

Re: folders that only root can access

PostPosted: Aug 13th, '17, 16:02
by doktor5000
gohlip wrote:Shirley, you must agree this is wrong.

Yes, I do agree that it's wrong that this requires a graphical editor. I use vi for that.
And I do also agree that we should not blindly follow other distributions to patch this out.

Re: folders that only root can access

PostPosted: Aug 14th, '17, 01:18
by xboxboy
The Linux way, surely is as Doktor mentions.

I have learnt to use Vi also.
A: When I ssh into a system I can repair stuff easily
B: Back in the bad nvidia days (did they go away?) where kernel updates broke x

If I need to use a kde program as root (admittedly I haven't tried on plazma yet) it's simply Alt+F2 for the run/search box then type "kdesu dolphin", asks for your root password then you can do as you like. Even destroying your system is simple :)

I should know, did that messing with chroots far too many times.

I know where roly is coming from, and I blame the 'sudo' movement ie. ubuntu style distro's with no root users and regular users who are dropped into the sudo group. Just crazy IMHO.