This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Dolphin and protected folders.

Tags: None
(comma "," separated)
sursumcorda
Registered Member
Posts
6
Karma
0

Dolphin and protected folders.

Thu Oct 22, 2020 9:27 am
Goodmorning everyone.
I think Dolphin's behavior has a problem when it comes to entering a protected directory.
I'll explain.
If I try to enter a protected directory Dolphin gives me an error message on a red background "cannot enter directory".
Now I know it is not possible to run Dolphin as "root", but this is something else here.
I would like to have the possibility, as happens for example with Nautilus (Gnome), to also enter protected folders, obviously after the system has asked me for my password or, possibly, that of root.
For now I have circumvented the problem by installing Nautilus and the Gnome editor but it doesn't seem very elegant to me to have to resort to non-KDE applications because Dolphin/KDE does not offer this very important feature.
Thank you in advance for any help,
Giorgio.
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS

Re: Dolphin and protected folders.

Thu Oct 22, 2020 9:31 am
Hi!

Can you explain why this is a «very important feature»? I never needed a rooted Dolphin for anything. If the user account has to access the folders, it should have permissions to do so, being in a group allowed to, or similar. What are you exactly doing with a rooted filebrowser? To me it looks like a permission problem, thats why I'm asking.
sursumcorda
Registered Member
Posts
6
Karma
0

Re: Dolphin and protected folders.

Thu Oct 22, 2020 9:49 am
koffeinfriedhof wrote:Hi!

Can you explain why this is a «very important feature»? I never needed a rooted Dolphin for anything. If the user account has to access the folders, it should have permissions to do so, being in a group allowed to, or similar. What are you exactly doing with a rooted filebrowser? To me it looks like a permission problem, thats why I'm asking.


Hi thank you for your answer.
For me it is very important to enter a protected folder to edit configuration files such as, for example, those under "/var/ lib/bluetooth" which in Manjaro is a folder that only root can read and edit, by file/folder permission.
It is evident that this is a permissions problem, as it is evident that I could edit them from the terminal with nano or another editor, but the point is that, in my opinion, in 2020 it is anachronistic to have to waste precious minutes typing paths and names of the file on a terminal when everything would be much easier and faster using the GUI tools (Dolphin, Kate).
In addition, this feature is already present in Kate, which allows you to view a protected file and edit and save it, obviously after entering your personal password (if the user has "sudo" privileges).
Why not foresee a similar thing on Dolphin too?
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS

Re: Dolphin and protected folders.

Thu Oct 22, 2020 12:06 pm
Well, I'd bet I'm faster typing «vim /var/lib/bluetooth/whatever» than you opening Dolphin and navigate with mouse clicks, even without using TAB-completion. But I know, thats not your point ;)

As you mentioned, there are possibilities to get the permissions using, e.g. PolicyKit for Kate, to edit such files. What is missing (with intent) is the policy for Dolphin. Kate seems to have an appropriate configuration to edit these files. As I do not know Manjaro, you should ask the Manjaro-Support why they did not set it up or to implement the missing PolicyKit configuration (or implement it yourself — but be warned, PolicyKit is a living nightmare ;) ).

I could understand if noone would implement this as there is a high security risk allowing a programm with the possibility of using third party plugins to run as root. Qt programs, afaik, are not designed to run as root, so there could be further issues besides security, like unwanted changes of users permissions, leading to an unusable GUI.
The root user normally does set up the systemwide configuration to a minimum wanted setup and each user does implement what he needs using local configuration files. I know, there are a lot of blogs and tutorials using «sudo» as a magic bullet for everything, but this is not how a multiuser-system should be set up. Just my 2 cents.

As an alternative approach: Try using Krusader as file browser which should be able to do this natively without messing your permissions up.
sursumcorda
Registered Member
Posts
6
Karma
0

Re: Dolphin and protected folders.

Wed Oct 28, 2020 11:23 pm
I know to some it seems weird that many insist on using the graphical interface and that diabolical tool called "mouse", but you know, the world is beautiful because it is varied and, above all, it has evolved towards GUI since Microsoft churned out the first edition of Windows and Apple produced the first Macintosh. We are talking about 1984/85, about 35 years ago.
Having said that I find that even claiming to be faster by typing characters on the terminal is a slightly exaggerated statement, in fact it often happens to be following guides made for a linux distro on another distro or even on an updated version and that does not follow the "rules" of the old version and you cannot find the same path and exact file name. In these cases, which happen in most of the times, being able to search with the aid of the mouse to go back and forth in the folder tree is an unbeatable convenience even for the most avid supporter of the terminal.
You said that Dolhin's missing feature of being able to work under "sudo" is dictated by security reasons but even here it seems like a rather excessive statement given that practically all other desktop environments, from Gnome to lxde, offer this possibility and, for me, rightly so.
Then you suggest me to address my complaint to Manjaro, as if it depends on the distro that I use this problem, but I had already said that by installing only the Gnome File Manager I can easily open the protected folders also in Manjaro / KDE, so in reality the problem is limited to Dolphin only.
Returning to security I believe that not allowing Dolphin to work in "sudo" is like the "paranoia" mode of firewalls or deciding to live forever inside a steel cube in order not to run any health risk. Yes, this way you avoid the risks but you also avoid living.
In conclusion I am sorry but I believe that these anachronistic positions are one of the main reasons why Linux still has so little diffusion among the general public.
IMHO.
Regards,
Giorgio.
User avatar
claydoh
Registered Member
Posts
1170
Karma
9
OS

Re: Dolphin and protected folders.

Thu Oct 29, 2020 1:10 am
sursumcorda wrote:Hi thank you for your answer.
For me it is very important to enter a protected folder to edit configuration files such as, for example, those under "/var/ lib/bluetooth" which in Manjaro is a folder that only root can read and edit, by file/folder permission.

This may be a distro specific setup choice, as for me in Kubuntu and KDE Neon, I can browse to any of these system level directories just fine with Dolphin without any admin privileges. If I am not mistaken, Manjaro normally utilizes a root account, so perhaps they have permissions set differently than, say, Ubuntu, which does not use a root account.

It is evident that this is a permissions problem, as it is evident that I could edit them from the terminal with nano or another editor, but the point is that, in my opinion, in 2020 it is anachronistic to have to waste precious minutes typing paths and names of the file on a terminal when everything would be much easier and faster using the GUI tools (Dolphin, Kate).

It is highly arguable that for many the terminal - especially using the tab-completion feature - is much faster and more efficient for many people than all the mouse movements, scrolling, overshooting, scrolling back, etc. But that is beside the point as one gets to use what one wants.

In addition, this feature is already present in Kate, which allows you to view a protected file and edit and save it, obviously after entering your personal password (if the user has "sudo" privileges). Why not foresee a similar thing on Dolphin too?

It is being worked on, actually. It has been a long time, though. At least for file creation/deletion/movement.


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS

Re: Dolphin and protected folders.

Thu Oct 29, 2020 9:41 am
sursumcorda wrote:I know to some it seems weird that many insist on using the graphical interface and that diabolical tool called "mouse",…

Never thought like this; there are tasks which are more easily done with a mouse, so I use this tool of evil too ;)

Having said that I find that even claiming to be faster by typing characters …find the same path and exact file name…

Searching does not require Dolphin to run as root. baloosearch is really fast, but by default restricted to your homefolder. Searching then is done with find, kfind, locate or a similar tool which works the same on command line and in Dolphin, so sure you can use it.

Then you suggest me to address my complaint to Manjaro, as if it depends on the distro that I use this problem…

As claydoh already mentioned, it IS a Manjaro-problem as your problem does not apply to Debian-based distros which allow the user to search (mostly) the whole directory structure. For me in arch, I can also navigate to nearly the whole structure, so its no arch problem too. Thats why I think you should address this problem to Manjaro.

Returning to security I believe that not allowing Dolphin to work in "sudo" is like the "paranoia" mode of firewalls …

There is no need to run Dolphin as root and the PolicyKit (if a rule is implemented) takes care of getting higher permissions only when needed. The past was full of problems with messed up permissions, because of starting a GUI-Tool as root without knowing how to do this (with e.g. sudo -H). The base concept of security is to use as low permissions as needed to do the task. You may call it «paranoia by design» if you want ;)

In conclusion I am sorry but I believe that these anachronistic positions are one of the main reasons why Linux still has so little diffusion among the general public.

Well, can only speak from my point of view, but for me it is not a goal for GNU/Linux to spread widely on the desktop. It is a system which needs a system administrator who knows what he does to provide users a flawless working system. At home we are all admin and user and responsible for our system (which is true for all operating systems). Depending on your country: admins are liable for the systems they administrate.
sursumcorda
Registered Member
Posts
6
Karma
0

Re: Dolphin and protected folders.

Thu Oct 29, 2020 9:43 am
claydoh wrote: ...

Thank you claydoh but... I already answered to everything you wrote.
Regards,
Giorgio.
sursumcorda
Registered Member
Posts
6
Karma
0

Re: Dolphin and protected folders.

Thu Oct 29, 2020 10:15 am
koffeinfriedhof wrote:Searching does not require Dolphin to run as root. baloosearch is really fast, but by default restricted to your homefolder. Searching then is done with find, kfind, locate or a similar tool which works the same on command line and in Dolphin, so sure you can use it.


If I cannot look into a folder I cannot see what's inside so, YES it is required to run Dolphin as root.
It is a function/feature that every file manager has and I think that Dolphin shuld have it too.

As claydoh already mentioned, it IS a Manjaro-problem as your problem does not apply to Debian-based distros which allow the user to search (mostly) the whole directory structure. For me in arch, I can also navigate to nearly the whole structure, so its no arch problem too. Thats why I think you should address this problem to Manjaro.


As I already said it is NOT a Manjaro problem given that I can browse the same protected folder by every file manager except Dolphin. So... it is a KDE/Dolphin related problem.

There is no need to run Dolphin as root and the PolicyKit (if a rule is implemented) takes care of getting higher permissions only when needed. The past was full of problems with messed up permissions, because of starting a GUI-Tool as root without knowing how to do this (with e.g. sudo -H). The base concept of security is to use as low permissions as needed to do the task. You may call it «paranoia by design» if you want ;)


Really? Dolphin/KDE is missing a function and you again suggest me to modify policykit rules?
I'm not exactly a "beginner" with Linux and I'm a programmer too but... I don't even want to think to learn another language to change a policy rule and, imagine what, I think 99,99% of normal users on earth are with me.

Well, can only speak from my point of view, but for me it is not a goal for GNU/Linux to spread widely on the desktop. It is a system which needs a system administrator who knows what he does to provide users a flawless working system. At home we are all admin and user and responsible for our system (which is true for all operating systems). Depending on your country: admins are liable for the systems they administrate.


I think there is already a solution for that: you can install the "server" version of the distro instead of "desktop".
On a servr all the security issues you are talking about makes sense and, usually, are managed only by expert linux administrators.
On a desktop everything should be easier and more "user friendly".

And actually I believe that linux should have the goal to spread in our pc's (I already have multiple pc's with linux and different distro's).

Regards,
Giorgio.
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS

Re: Dolphin and protected folders.

Thu Oct 29, 2020 12:53 pm
sursumcorda wrote:As I already said it is NOT a Manjaro problem given that I can browse the same protected folder by every file manager except Dolphin. So... it is a KDE/Dolphin related problem.

As this does not apply to other distros than Manjaro, it is not a KDE/Dolphin problem (see below). Perhaps they just missed to implement something or apply different rulesets, who knows? Perhaps another Manjaro-User can help us here?

…I think 99,99% of normal users on earth are with me.

Do they? Then there must be a lot of more topics like this, I think. Perhaps that is just what you think that others should think?

I think there is already a solution for that: you can install the "server" version of the distro instead of "desktop".
On a servr all the security issues you are talking about makes sense and, usually, are managed only by expert linux administrators.
On a desktop everything should be easier and more "user friendly".

There is no difference between a server setup and a desktop setup but the preinstalled packages (which also depend on the distro). The basic setup is exactly the same. The GUI-stuff is just an enhancement to the underlying system, just a program (or a set of programs) you start after the system bootet up. Perhaps the graphical installers make suggest that these systems are different.

As an easy example: You have two different systems with kde set up.The first uses libinput, the other evdev for the mouse. The kde systemsettings show different options for the same mouse on the same hardware using the same distro, version and whatever besides that little library-change. Thats what I mean talking about the «underlying system» which is responsible of what the GUI can or cannot provide.
(just searched the forums, see Rog131's answer with images).
vanadiumboy
Registered Member
Posts
16
Karma
0

Re: Dolphin and protected folders.

Thu Jan 21, 2021 2:23 pm
"If I try to enter a protected directory Dolphin gives me an error message on a red background "cannot enter directory"."

==I tried it on my system and it works.
For example, I went into
/opt/Qt/
and I opened
InstallationLog.txt
with Kate.

Of course, if I try to save it in the same location, Kate asks for a admin pwd.

I am using Kubuntu 20.10.
sursumcorda
Registered Member
Posts
6
Karma
0

Re: Dolphin and protected folders.

Sun Jan 24, 2021 5:30 pm
Well, linux is beautiful because it gives you the freedom to choose and change.
I changed to Gnome.
Problem solved!

I'll continue to love KDE, anyway.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]