I have set up the Ubuntu VM (Ubuntu 22.04.3 LTS) with the following options for /tmp: So that under /tmp, no execution is allowed.
cat /etc/fstab for /tmp: /dev/mapper/ubuntu--vg-tmp--lv /tmp ext4 rw,nosuid,nodev,noexec,relatime 0 0
However, under /tmp, I can still execute the following shell script:
root@cdb30:/tmp# cat a.sh#!/bin/shecho "I am working"root@cdb30:/tmp# ./a.shI am workingroot@cdb30:~# findmnt -T /tmpTARGET SOURCE FSTYPE OPTIONS/tmp /dev/mapper/ubuntu--vg-tmp--lv ext4 rw,relatimeroot@cdb30:~#
Any help or pointers would be very much appreciated.