How to mount a folder itself with parameters in fstab
Why didn't noexec
apply on the first attempt? How do I get such a mount in fstab
?
# sudo mount -o bind,noexec /var /var
# mount | grep var
/dev/sda3 on /var type ext4 (rw,relatime)
# sudo mount -o remount,noexec /var
# mount | grep var
/dev/sda3 on /var type ext4 (rw,noexec,relatime)
So it didn't work out
/var /var none noexec,bind 0 0
This doesn't work either
/var /var none bind 0 0
/var /var none remount,noexec 0 0
Perhaps there is an option to set the initial folder when mounting via a block device.
In general, it is interesting to pull a directory from the file system immediately, without unnecessary bindings.
1
1 answers
The LFS project provides instructions for "mounting" paths:
export LFS=/mnt/lfs
mount -v --bind /dev $LFS/dev
0
Author: Hellseher, 2018-07-31 12:29:30