folders that only root can access SOLVED

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

folders that only root can access SOLVED

Postby roly » Aug 13th, '17, 02:15

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
roly
 
Posts: 70
Joined: Feb 5th, '12, 06:07

Re: folders that only root can access

Postby doktor5000 » Aug 13th, '17, 03:44

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.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: folders that only root can access

Postby gohlip » Aug 13th, '17, 06:47

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
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: folders that only root can access

Postby doktor5000 » Aug 13th, '17, 14:58

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.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: folders that only root can access

Postby gohlip » Aug 13th, '17, 15:14

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.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: folders that only root can access

Postby richardwest » Aug 13th, '17, 15:31

urpmi kde-rootactions-servicemenu

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

What's the problem?
Richard.
richardwest
 
Posts: 50
Joined: May 26th, '11, 12:28
Location: Suffolk, England

Re: folders that only root can access

Postby doktor5000 » Aug 13th, '17, 16:02

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.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: folders that only root can access

Postby xboxboy » Aug 14th, '17, 01:18

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.
xboxboy
 
Posts: 401
Joined: Jun 2nd, '13, 06:41


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest