Announcement

Collapse
No announcement yet.

File work, as root

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    File work, as root

    Requesting a quick checkup on a fav subject, Dolphin as root (admin privileges).

    https://www.kubuntuforums.net/forum/...-administrator
    https://www.kubuntuforums.net/forum/...oot-workaround
    - etc. -

    -- So, the current status is you can't open Dolphin using kdesudo, sudo su, sudo -i. (I see the security message/advisory, upon trying)
    -- There is the pkexec workaround.
    -- krusader has the option Tools > run as root.

    That about right? ... well, not "right," but "correct"?

    Occasionally, I only need-want to see what's in /boot/esp/EFI (and rarely, sometimes, to modify the contents of that folder, experimenting, etc.).
    => krusader looks ok to me, for such work.

    (I just built a new PC, as some of you know, and am setting up 20.04 for the first time; been a little on the sidelines just simply running 18.04 uneventfully. Thus, the questions & double-checking a few things.)
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    #2
    Midnight Commander is great. Much better for moving large amounts of stuff than dolphin as well.

    Comment


      #3
      Opening and saving files do not require root privileges up front - you get a prompt for the password when saving, if Kate or Kwrite are used to open the file.

      Using Dolphin to create/delete/rename them in this fashion is not there yet (and has been dragging for quite some time, for whatever reasons.
      But:
      pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin

      I myself agree with MC for this sort of thing, when needed.
      Last edited by claydoh; Nov 27, 2021, 12:39 PM.

      Comment


        #4
        Hmmm ... my reply to Bings disappeared ... ?
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5


          As you have experienced ‘odd’ things here, I might suggest that I do for you, what I did for oshunluvr; crest a new account, merge your existing account into the new, then rename the new account to the original. The anomaly that oshunluvr was experiencing was fixed doing this.
          Using Kubuntu Linux since March 23, 2007
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            OK, Snowhog (Post #5). Sounds good to me!
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Open Dolphin as Root with the service menu https://store.kde.org/p/1384645/

              Comment


                #8
                Thanks for this, Fred47. Could be a good option. I think for myself, Krusader is enough for now, and I do understand it better. Editing files is easy, as many have said, where Kate will ask your admin pw. Other than that, I * may * only "need-want" to get into the ESP to goof around. Thanks, this could be good info for others here.
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9

                  Originally posted by Qqmike View Post
                  Occasionally, I only need-want to see what's in /boot/esp/EFI (and rarely, sometimes, to modify the contents of that folder, experimenting, etc.).
                  Sorry, I should have spotted this note earlier.

                  The ESP is a FAT32 (or some variation on that) partition that has no permissions in the file system. The permissions Linux uses are set at mount time. In my /etc/fstab I have the line
                  Code:
                  LABEL=EFI      /boot/efi   vfat    umask=000,noatime,noauto,user  0   1
                  That "umask=000" determines the permissions everything in the ESP gets, in the same reverse way the umask shell built-in does; 000 implies 777, or rwxrwxrwx.

                  (Change "LABEL=EFI" to "UUID=xxxx-xxxx" if you want to make things harder for yourself, or if there's multiple ESPs in your system with the same label. The noauto,user options mean the ESP is not mounted until I want it; this stops updates from messing with my boot.)

                  Regards, John Little

                  Comment


                    #10
                    Thanks, jlittle. Yes, very helpful. Actually, it brought back memories. In the past, we’ve really hit this subject hard. One option has always been to get root, sudo -i (for GUI), and go from there. That option no longer works for security reasons. But kubicle had mentioned two things: (1) Krusader; (2) umask 0022. Here, let me just paste it in, and you’ll see the discussion (at that time):

                    Code:
                    # /boot/efi was on /dev/sda1 during installation
                    # This statement only gives read/write access to root:
                    # UUID=C896-1CFF /boot/efi vfat umask=0077 0 1
                    # NOTE: Next line gives full permissions to everyone on /boot/efi:
                    # UUID=C896-1CFF /boot/efi vfat umask=0000 0 1
                    # Note, kubicle: If you are going to edit the efi fstab umask, it would be safer to use umask=0022,
                    # which doesn't give straight write access...
                    # you could still open the files with normal (not root) kate since it has read access,
                    # and it should still ask for password when you try to save, like this:
                    UUID=C896-1CFF /boot/efi vfat umask=0022 0 1
                    This is what you are saying, or getting at.

                    First, this won’t work: sudo chmod -v -R 777 /boot/efi
                    Output: mode of '/boot/efi/EFI' changed from 0700 (rwx------) to 0777 (rwxrwxrwx)
                    Chmod won’t work on FAT32; it will not override the fstab permissions. The output of chmod looks good, but it doesn’t work.

                    Btw, here’s a cheet sheet I have used for umask, also what you are saying:
                    0 1 2 3 4 5 6 7
                    r + + + +
                    w + + + +
                    x + + + +






                    It works as the normal octal permissions but subtracted from 7, and use the absolute value. for instance if you want to set the permissions to 0777 you will need to set it 0000 in the umask(e.g. umask=0000), if you want to set it to 0755 you will set it to 0022.
                    The first character represents that its an octal permissions
                    The second is for the owner
                    The third is the group
                    The last is for other or The World


                    => I think using krusader as root (Tools > Open krusader as root) is all I need for now. I will rarely go into the ESP, and then only briefly to see or edit or drop something in there.

                    Many thanks, jlittle, for your post; great reminder! I very rarely do work like this (e.g., with umask), and so I can’t remember all these details (actually, I * refuse * to remember ;-) )
                    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                    Comment

                    Working...
                    X