Tuesday 21 August 2018

linux - partition being mounted as noexec, not fstab, what else can it be?


I have one partition being mounted as noexec. It shows on the mount output, but there is nothing on fstab to do that.


Where is the noexec coming from?


my fstab:


UUID=1fbb29fe-cef2-4cc2-9b1e-ac45e74289ac /               ext4    noatime,nodiratime,errors=remount-ro 0       1
# swap was on /dev/sda3 during installation
UUID=some-uuid-string none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0

tmpfs /tmp tmpfs nodev,nosuid,noexec,size=2G 0 0

# old disks
#/dev/md0 /DATA ext4 noauto,nodiratime,errors=remount-ro,user 0 2
# new disks:
/dev/md1 /DATA ext4 noauto,nodiratime,errors=remount-ro,user 0 2

I mount the /DATA partition above as either a user or root. In either case I get:


/dev/md1 on /DATA type ext4 (rw,nosuid,nodev,noexec,nodiratime,relatime,errors=remount-ro,stripe=16384,data=ordered,user)

Answer



The default is indeed exec, but using the user option implies the following options:



  • noexec

  • nosuid

  • nodev


As explained in man mount:


   user   Allow an ordinary user to mount the filesystem.  The name of the
mounting user is written to the mtab file (or to the private
libmount file in /run/mount on systems without a regular mtab)
so that this same user can unmount the filesystem again. This
option implies the options noexec, nosuid, and nodev (unless
overridden by subsequent options, as in the option line
user,exec,dev,suid).

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...