Cannot mount internal NTFS partitions, only as root

Forum Forums New users New Users and General Questions Cannot mount internal NTFS partitions, only as root

  • This topic has 28 replies, 7 voices, and was last updated Sep 8-11:57 pm by Anonymous.
Viewing 15 posts - 1 through 15 (of 28 total)
  • Author
    Posts
  • #66175
    Anonymous

      Hello. Here with second thread.

      I can see the rig’s internal hard disk’s partitions on SpaceFM -> Devices -> Settings -> Show -> Internal drives. All of them being on sda and belonging to a Windows 10 UEFI installation. So its system partition is NTFS. None of all the sda partitions is mounted by default, perhaps because I don’t use the boot parameter “automount”, but that’s fine for me.

      But when trying to mount it by clicking it on SpaceFM Device menu I get error:
      udevil: denied 88: device /dev/sda# is an internal device and you're not root
      (# being a number)

      Trying with mount command just gives the same result as described in my previous thread: “only root can do mount”.

      Slitaz Linux doesn’t have this issue neither, albeit I think openSUSE does have it indeed IIRC…

      Now, I haven’t tried a USB stick or external storage formatted with NTFS yet, though I’m imagining I’d get similar results…

      Is this whole thing by design?

      By the way, I’d like to add an additional different question yet more or less related, too brief to attempt a new whole thread.
      Aside all the sda internal devices, I also see a strange additional one: /dev/loop0 mounted on /live/linux. Unlike the other devices, this one is mounted by default, yet I cannot browse it as regular user due to /live directory being owned only by root.
      What’s this device? Is it safe to just unmount it (as root)?

      Thanks beforehand for your attention.

      #66179
      Anonymous
        Helpful
        Up
        0
        ::

        hi ctcx,

        Which version of antiX-base are you using? Post the output of
        inxi -Fxz
        So others know what hardware you have.
        Some users are having issues with the really new emmc hard drives.
        You may need the newer 5.10 kernel if the computer is fairly new.

        #66180
        Member
        ex_Koo
          Helpful
          Up
          0
          ::

          All I do is use disk-manager and mount my storage drives on bootup.
          If it is an NTFS drive make sure ntfs-3g is installed

          sudo disk-manager
          Tick box next to dirve you want open as user.
          Then file > save
          Done.

          To bad mark down image links don’t work here.. ![2021-09-01-164913_1254x366_scrot.png](https://scrot.cloud/images/2021/09/01/2021-09-01-164913_1254x366_scrot.png)

          • This reply was modified 1 year, 8 months ago by ex_Koo.
          • This reply was modified 1 year, 8 months ago by ex_Koo.
          #66183
          Member
          Xecure
            Helpful
            Up
            1
            ::

            Udevil is what manages automounting in antiX and also is used as mounting rules for spacefm.
            By default, it disables mounting of internal devices as non-root for “security reasons” (mainly for multiuser systems, so they cannot explore internal devices for privacy reasons), but you can enable it easily.
            Edit as root the file /etc/udevil/udevil.conf
            sudo geany /etc/udevil/udevil.conf
            and change the commented line # allowed_internal_devices to:
            allowed_internal_devices = *

            Save, log out, log in, and now you can mount internal devices from spacefm as non-root.

            For the other issues, I would need a bit more time to test them out on my system, but (on my system) automounting only takes max 3 seconds for any external device (fat32 included), and the Control Centre > Disks > Configure Automount lets me enable/disable automounting of external devices and CDs and has worked for me for some time.
            If you can poste the system info suggested by linuxdaddy we can check the exact version you are running to see if it also happens on other systems (and we haven’t realized it til now).

            The things mounted in /live/ are related to the linux squash file system (from live linuxfs) and the persistence file systems (for live persistence), and you don’t need to be bothered about them. Its the (behind the scene) antiX magic.

            antiX Live system enthusiast.
            General Live Boot Parameters for antiX.

            #66233
            Anonymous
              Helpful
              Up
              0
              ::

              Thanks everyone.

              Output of inxi command:

              demo@antix1:~
              $ inxi -Fxz
              System:
                Host: antix1 Kernel: 4.9.0-264-antix.1-amd64-smp x86_64 bits: 64 
                compiler: gcc v: 8.3.0 Desktop: IceWM 2.3.4 
                Distro: antiX-19.4_x64-base Grup Yorum 20 May 2021 
                base: Debian GNU/Linux 10 (buster) 
              Machine:
                Type: Laptop System: Gateway product: NE-522 v: V2.02 serial: <filter> 
                Mobo: Gateway model: NE-522 v: V2.02 serial: <filter> UEFI: Insyde v: 2.02 
                date: 05/03/2013 
              Battery:
                ID-1: BAT0 charge: 17.5 Wh condition: 23.5/37.0 Wh (63%) 
                model: SANYO AL12A32 status: Charging 
              CPU:
                Topology: Dual Core model: AMD E1-2500 APU with Radeon HD Graphics 
                bits: 64 type: MCP arch: Jaguar rev: 1 L2 cache: 1024 KiB 
                flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
                bogomips: 5589 
                Speed: 800 MHz min/max: 800/1400 MHz Core speeds (MHz): 1: 800 2: 1000 
              Graphics:
                Device-1: AMD Kabini [Radeon HD 8240 / R3 Series] 
                vendor: Acer Incorporated ALI driver: radeon v: kernel bus ID: 00:01.0 
                Display: x11 server: X.Org 1.20.4 driver: ati,radeon 
                unloaded: fbdev,modesetting,vesa resolution: 1366x768~60Hz 
                OpenGL: 
                renderer: AMD KABINI (DRM 2.49.0 4.9.0-264-antix.1-amd64-smp LLVM 7.0.1) 
                v: 4.5 Mesa 18.3.6 direct render: Yes 
              Audio:
                Device-1: AMD Kabini HDMI/DP Audio vendor: Acer Incorporated ALI 
                driver: snd_hda_intel v: kernel bus ID: 00:01.1 
                Device-2: AMD FCH Azalia vendor: Acer Incorporated ALI 
                driver: snd_hda_intel v: kernel bus ID: 00:14.2 
                Sound Server: ALSA v: k4.9.0-264-antix.1-amd64-smp 
              Network:
                Device-1: Qualcomm Atheros QCA8171 Gigabit Ethernet 
                vendor: Acer Incorporated ALI driver: alx v: kernel port: 2000 
                bus ID: 01:00.0 
                IF: eth0 state: down mac: <filter> 
                Device-2: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter 
                vendor: Lite-On driver: ath9k v: kernel port: 2000 bus ID: 05:00.0 
                IF: wlan0 state: up mac: <filter> 
                Device-3: Lite-On Atheros AR3012 Bluetooth type: USB driver: btusb 
                bus ID: 4-2:3 
              Drives:
                Local Storage: total: 223.57 GiB used: 597.8 MiB (0.3%) 
                ID-1: /dev/sda vendor: A-Data model: SU650 size: 223.57 GiB 
              Partition:
                ID-1: / size: 3.64 GiB used: 597.8 MiB (16.1%) fs: overlay source: ERR-102 
              Sensors:
                System Temperatures: cpu: 59.2 C mobo: 39.0 C gpu: radeon temp: 59 C 
                Fan Speeds (RPM): N/A 
              Info:
                Processes: 126 Uptime: 1h 16m Memory: 5.28 GiB used: 570.5 MiB (10.6%) 
                Init: SysVinit runlevel: 5 Compilers: gcc: 8.3.0 Shell: bash v: 5.0.3 
                inxi: 3.0.36 
              demo@antix1:~
              $

              @Xecure:
              Thanks, editing udevil.conf and restarting session did the thing. Though the file’s comments do emphasize the security risks. Just to be sure, is there really no danger in general with this, even if normally browsing the internet with the web browser, or other activities?
              Also, apart, I noticed that when copying files from FAT32 USB stick or NTFS internal drive to Antix system, they’re all copied with *full* 777 permissions, or at very least all with +x. WTH?

              Regarding CD/DVD, no dice. In the Control Centre options you mention I already have default enabled “Automount external devices” and “Open file manager with mount” for USB and optical media. But as I already mentioned, when inserting any optical disk it tries to automount it always in /live/boot-dev, owned only by root. I saw the udevil.conf change was not related to this at all…

              So no harm at all in the system if I choose to unmount /live/linux (/dev/loop0)?

              Hope you can find the time to test more, as you mentioned. USB stick still takes freaking 30 seconds to be recognized; doesn’t happen on Windows…

              Finally, I noticed you addressed all issues in this single thread. Am I allowed to discuss them all here as well, along other “small initial” issues I still have? Or should I keep making new separate threads for each different issue?

              Thanks very much.

              #66236
              Anonymous
                Helpful
                Up
                0
                ::

                What the heck? I just replied here, and though my posts count and last activity forum indicator seem to support this, I cannot see my reply just now! Even thread’s post counter is still the previous one, and the only thing I did to my post was making an edit…

                #66249
                Anonymous
                  Helpful
                  Up
                  0
                  ::

                  and the only thing I did to my post was making an edit…

                  This forum software on this site has an inbuilt, very aggressive, WordFence spamfilter.
                  Too often, upon performing even a simple edit, a post will wind up embargoed {quarrantined?}
                  A moderator can / will UN-embargo the post, but it might take ’em a week or a month to notice… so you may want to expedite by sending a PM to any of the moderators or administrators.

                  harm at all in the system if I choose to unmount /live/linux (/dev/loop0)?

                  DANGER !
                  Don’t try to unmount it.
                  It’s a necessary part of the “liveboot” mechanism.
                  Said differently, it is a “necessary for housekeeping” re-representation of files residing elsewhere within the filesystem.

                  discuss them all here as well

                  Whenever a certain bit merits special attention, we can ask a moderator to “split off” post(s) to a separate thread.
                  FYI: inquiries seeking a simple yes / no reply, or a definitive answer to a specific question, typically those can be self-answered by searching pre-existing forum topics… but that route depends on knowing the term, the lingo, to search for.

                  #66280
                  Member
                  Xecure
                    Helpful
                    Up
                    0
                    ::

                    Though the file’s comments do emphasize the security risks. Just to be sure, is there really no danger in general with this, even if normally browsing the internet with the web browser, or other activities?

                    Convenience will usually conflict with security. That is why this feature is usually disabled by default on most Linux distros. There is risk for a malignant software without root permissions to have access to your internal files, so you can either accept the risk, protect yourself by isolating the web browser or returning to a root-only permission to internal files. I usually prefer to have automount disabled and internal-drive access set for root except for specific drives (set up already in /etc/fstab).
                    Being realistic, the probability is low for malware infecting you and accessing your internal drives, so you can do whatever you like for your own convenience (or whatever you consider safer).

                    Also, apart, I noticed that when copying files from FAT32 USB stick or NTFS internal drive to Antix system, they’re all copied with *full* 777 permissions, or at very least all with +x. WTH?

                    See what is the permissions for ntfs/exfat in udevil.conf I think it isn’t set by default, so probably it is fmask and dmask = 000 (read, write, execute and everything else enabled by default), so those permissions will be set at mount time. Unmount, change the default permissions for ntfs/exfat and see if things change (or if set in /etc/fstab, see the configuration there).

                    I cannot reproduce the other issues on my current custom antiX live USB or installed, so I will try again tomorrow in a completely clean and pristine live USB with antiX 19.4 base x64 to see if it is any different (I need some time to select and backup important files in the testing USB device).

                    antiX Live system enthusiast.
                    General Live Boot Parameters for antiX.

                    #66283
                    Forum Admin
                    rokytnji
                      Helpful
                      Up
                      0
                      ::

                      What the heck? I just replied here, and though my posts count and last activity forum indicator seem to support this, I cannot see my reply just now! Even thread’s post counter is still the previous one, and the only thing I did to my post was making an edit…

                      Just checked and nothing is pending and no drafts in your user name.
                      Can’t fix what is not there.

                      Sometimes I drive a crooked road to get my mind straight.
                      Not all who Wander are Lost.
                      I'm not outa place. I'm from outer space.

                      Linux Registered User # 475019
                      How to Search for AntiX solutions to your problems

                      #66285
                      Moderator
                      christophe
                        Helpful
                        Up
                        0
                        ::

                        Just checked

                        I checked, too, roky. When I first read the post. I concur; nothing found. Puzzled…

                        • This reply was modified 1 year, 8 months ago by christophe.

                        confirmed antiX frugaler, since 2019

                        #66295
                        Member
                        ex_Koo
                          Helpful
                          Up
                          0
                          ::

                          This is the /etc/fstab entry for my internal drive to auto mount on startup.

                          #Entry for /dev/sdb2 :
                          UUID=A8F4759EF4757004 /media/New_Volume ntfs-3g defaults,locale=en_US.UTF-8 0 0

                          #66303
                          Anonymous
                            Helpful
                            Up
                            0
                            ::

                            @rokytnji, @christophe:
                            I apologize for the inconvenience. I promise that, after circa 10 minutes of editing that post, it was still not visible within the thread here. And even when the subforum said “x posts” in the thread, within thread itself it said “Viewing x-1 posts”, mine being the one missing.
                            Even right now it’s the same case! Just the “hidden” post is someone else’s now…
                            I think it was my ignorance about these forums, and skidoo was right.

                            @Xecure:
                            Based on your previous advise, I was choosing to always unmount /live/linux (/dev/loop0) after finishing clean booting the live system. As far as I have used it, seemingly I haven’t noticed any “explicit” harm or malfunction until now. But, skidoo’s advise… is he actually right? Am I actually breaking the live system without noticing at all?

                            Regarding the use of any admin stuff, this is something I have always doubted about all along… How should I actually use them best? If I have an opened terminal and did su/sudo there, or open an app as admin user (or want to browse the internal devices), and I have web browser, IRC or mail client, or anything else, up and running but as regular user of course, am I in danger as well?
                            Must I better close *everything* before attempting any admin stuff in the system?

                            Regarding exFAT/NTFS, this is how the entry looks for the Windows 10 partition:

                            # Added by make-fstab /dev/sda4
                            UUID=<16-char alphanumeric>     /media/sda4     ntfs-3g     noauto,noexec,uid=1000,gid=users,dmask=002,fmask=113,users     0 0

                            In udevil.conf, I have nothing permission-related under the “default_options” whole section, only under “allowed_options”.

                            Finally, about the other issues, I managed to do a test in another different rig, an also old Toshiba Satellite L955 from circa 2012. Made me realize quite more the issue with the CD/DVD.
                            In my rig, I didn’t mention that I have to use an external CD/DVD USB drive because internal one is broken. Not the same with the Toshiba. There I inserted DVD on internal drive, and got same errors when trying to mount any disk there. BUT, different luck when plugging the external drive. CD/DVD was automatically mounted with no problems in /media/demo/antiX-Live.
                            So took a look at /etc/fstab. /dev/sr0 was set to be mounted to /live/boot-dev.
                            Got back to my rig, loaded live system and took a look at /etc/fstab. The unused broken /dev/sr0 is set to be mounted on /media/sr0, while external /dev/sr1 is set to /live/boot-dev.
                            So the actual issue I’m having is: live system is always loaded with fstab pointing the optical drive used to boot always to /live/boot-dev, readable only by root. If I delete the fstab entry and plug the optical disk it mounts with no problems to /media/demo/<whatever_disk>.

                            But, regarding the USB stick thing, it also took half a minute to be recognized in the Toshiba rig…

                            #66378
                            Anonymous
                              Helpful
                              Up
                              0
                              ::

                              @Xecure:
                              I correct myself a bit.
                              In other Linux distros (perhaps almost all in general?) the NTFS thing is certainly the same as Antix: copying from NTFS to Linux fs (ext4, tmpfs in case of live system, etc…) results in *all* files and directories copied with full 777 permissions.
                              However, with FAT32 (vfat or exfat, not sure…) is different: on Antix they’re copied not with full 777, but *all* with +x. On other distros they’re copied as they should: 755 for directories and 644 for files.

                              And reiterating a bit the test done in the other Toshiba rig with the USB stick, it also took half a minute to be recognized there…

                              #66382
                              Anonymous
                                Helpful
                                Up
                                0
                                ::

                                https://ignorantguru.github.io/udevil/udevil.conf.txt
                                ? Does the ‘default_options_vfat’ line within udevil.conf on your system match the following:
                                default_options_vfat = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID, utf8

                                If so, something other than udevil must be handling the mounting operation.

                                However, with FAT32 (vfat or exfat, not sure…)

                                Might need to tweak the as-shipped ‘default_options_exfat ‘ line

                                allowed_options_exfat     = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID, umask=0077, namecase=*, ro, rw, sync, flush, iocharset=*, remount, nonempty
                                default_options_exfat     = nosuid, noexec, nodev, noatime, umask=0077, uid=$UID, gid=$GID, iocharset=utf8, namecase=0, nonempty
                                #66488
                                Anonymous
                                  Helpful
                                  Up
                                  0
                                  ::

                                  https://ignorantguru.github.io/udevil/udevil.conf.txt
                                  ? Does the ‘default_options_vfat’ line within udevil.conf on your system match the following:
                                  default_options_vfat = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID, utf8

                                  If so, something other than udevil must be handling the mounting operation.

                                  No, it certainly does not match original developer’s upstream default udevil.conf; it’s similar, but lacks exactly the fmask and dmask options. The same case for all the rest of default_options_***.
                                  Checked with latest Antix 19.4 x64 base live ISO as it ships.

                                  However, adding the options to the vfat line did the thing; now files and directories copied from USB stick to Antix system have the expected permissions.
                                  However the freaking USB stick still takes 30 seconds to be recognized…

                                  So now few doubts:
                                  Why would Antix choose to remove those options, if they’re even suggested by upstream developer?

                                  If there are no explicit default options set in udevil.conf, then how do udevil and/or fstab assign “default” permissions? Where do they get “defaults” from?

                                  And finally, reiterating, I was choosing to always unmount /live/linux (/dev/loop0) after finishing clean booting the live system. As far as I have used it, seemingly I haven’t noticed any “explicit” harm or malfunction until now. But, skidoo’s advise… Am I actually breaking the live system without noticing at all?

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