Mount drive

  • This topic has 6 replies, 2 voices, and was last updated Mar 9-9:23 pm by anticapitalista.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #78836
    Member
    blur13

      Hi!

      antiX 19.5

      I realize this is probably a noob question, and I tried searching the forum for answers but didnt find any. Anyways, I use a file manager called nnn thats terminal based. I have a second harddrive for general storage. I can see the drive in /media/user/, but when I access it I get “permission denied”. ls -l shows drwx—— 2 root user. I open up SpaceFM and click on the drive and I’m in, no need to type in a password or anything. I check ls -l again and now its changed to drwxr-xr-x 5 user user. I can now access the drive using my other file manager, nnn. So whats going on here? What command is spacefm executing under the hood to automatically give me permission to access the drive? Any way to make it so that the second harddrive is accessible from startup?

      #78838
      Forum Admin
      anticapitalista
        Helpful
        Up
        0
        ::

        Does the drive show up in /etc/fstab? If not, you could add it (sudo make-fstab in a terminal – but make sure you save your existing /etc/fstab before doing this)
        Can you mount it using rox-filer?
        What is the drive formatted as? (ext or ntfs)

        Philosophers have interpreted the world in many ways; the point is to change it.

        antiX with runit - leaner and meaner.

        #78839
        Member
        blur13
          Helpful
          Up
          0
          ::

          Thanks for the quick reply.

          Rox filer gives me “Error scanning ‘/media/user/’: Can’t open directory: Permission denied”

          I checked fstab and its not there.

          I remember implementing the following that was posted on the forum by Xecure:

          “Another thing you can do (it is not the recommended way, but it can easy users suffering) is to allow any user to mount internal drives (non-root). If you edit /etc/udevil/udevil.conf, search for # allowed_internal_devices, un-comment it and leave it looking like this:
          allowed_internal_devices = *
          This will let you mount all internal devices as your usual user without the need of root. This is OK on your personal configuration, but it is not recommended, as any users on your system would be able to mount your internal devices without any permissions and have access to your files.”

          So maybe spaceFM is using udevil to mount the drive and the above would explain why no password is needed?

          Maybe I’m getting ahead of myself, if I use sudo make-fstab and add the drive there, could I access it as a user?

          The drive has two partitions, one ext4 and one ntsf.

          • This reply was modified 1 year, 2 months ago by blur13. Reason: added file system format of drive
          #78842
          Member
          blur13
            Helpful
            Up
            0
            ::

            Did some more exploring and I’m pretty sure “udevil mount /dev/sdb5” is the command spaceFM is using, running that from the terminal mounts the drive with no password required. So could I simply put that command in the startup file to have the drive accessible? Do I need to put an “&” at the end? Ie:

            udevil mount /dev/sdb5 &

            #78843
            Forum Admin
            anticapitalista
              Helpful
              Up
              0
              ::

              I thought it was an internal drive, but it seems like it is an external one so editing /etc/fstab may not be of any use unless it is permanently plugged in.

              Philosophers have interpreted the world in many ways; the point is to change it.

              antiX with runit - leaner and meaner.

              #78844
              Member
              blur13
                Helpful
                Up
                0
                ::

                It is an internal drive, connected to the motherboard using SATA cable. Its not USB or anything like that. I read in the man pages that udevil is mainly for removable storage but it seems to work with internal drives as well. But maybe editing fstab is the better approach?

                #78845
                Forum Admin
                anticapitalista
                  Helpful
                  Up
                  0
                  ::

                  ok. try what I posted above.

                  Philosophers have interpreted the world in many ways; the point is to change it.

                  antiX with runit - leaner and meaner.

                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.