I am setting setuid on mkdir
without making it as executable.
chmod u+s /usr/bin/mkdir
chmod u-x /usr/bin/mkdir
[root@rhel-85 /]# ls -l /usr/bin/mkdir
-rwSr-xr-x. 1 root root 84664 Jul 9 2021 /usr/bin/mkdir
Now, when I login as another user "user1"
I am still able to create directory even when the "mkdir" binary is non-executable.
My understanding is that "user1" should not be able to create directory because mkdir
is non-executable.