dev/shm noexec not sticking after reboot
tmpfs /dev/shm tmpfs defaults,nosuid,noexec,rw 0 0
And the options (mainly noexec) get applied if you remount /dev/shm.
But, and this is the odd bit, if I reboot my Linode, its like I havent even put the entry in, when you run mount. It just loads with default settings. If I remount, its fine.
Any help greatly appreciated.
Thanks.
6 Replies
nsuid,nodev,rw
But I want it to load with:
noexec,nosuid,nodev,rw
But its like its being ignored in fstab at boot.
I cant even find a config file which tells /dev/shm to load with those defaulkt settings.
@obs:
Try this instead
/dev/shm /dev/shm tmpfs noexec,nosuid,rw,nodev 0 0
Thanks, I'll give this a try when I get in later and let you know how I get on.
/dev/xvda on / type ext3 (rw,noatime,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
So I have instead edited the defaults and mtab script so as to include noexec.
If anyone else has the same issue, Ill post up instructions
I have met the same issue as yours. Could you post your instructions?
I am on Debian 6 (amd64), KVM virtualisation.
I have digged into /etc/init.d/mtab.sh, and now I have done to correct it.
nano /etc/init.d/mtab.sh
change from
domtab tmpfs /dev/shm tmpfs -onosuid,nodev$SHM_OPT
into
domtab tmpfs /dev/shm tmpfs -onosuid,noexec,nodev$SHM_OPT
It works perfectly with Debian 6 amd64 / KVM box. I am not sure if it works on other systems/structures.
(Note that, I have edited $SHM_OPT in /etc/defaults/tmpfs, but it has not had affect after rebooting.)