Thanks for your suggestion. As you noted, Ubuntu doesn't create a partition for /tmp, and unfortunately binding and remounting the tmp directory doesn't prevent users from executing files.
"Note that the filesystem mount options will remain the same as those on the original mount point, and cannot be changed by passing the -o option along with --bind/--rbind."
I'm marking this bug as invalid because it's not something we can currently impliment.
Thanks for your suggestion. As you noted, Ubuntu doesn't create a partition for /tmp, and unfortunately binding and remounting the tmp directory doesn't prevent users from executing files.
$ sudo mount -o bind /tmp /tmp
$ sudo mount -o remount,bind,nosuid /tmp /tmp
$ echo '#!/bin/echo' > foo
$ chmod +x foo
$ ./foo
./foo
The mount manual page explains this:
"Note that the filesystem mount options will remain the same as those on the original mount point, and cannot be changed by passing the -o option along with --bind/--rbind."
I'm marking this bug as invalid because it's not something we can currently impliment.
Thank You,
-Dave