I have a simple script that runs fine under an app ID (just touches a new file), which I am trying to get to call via my personal ID. Note the target file location is in an area that my personal ID does not have write access to (but the owner of the script does) and I have set the SUID bit on the script, yet when i invoke it as my own ID (myID myGrp) , it gives permission denied on the touch.
The script's settings are correct as such:
-rwsrwxr-x appID appGrp 1.sh
(just contains touch /myDir/1
)
This is the very purpose of the suid bit, yet it does not do what it's supposed to. Note the target dir has perms as follows:
drwxrwxr-x appID appGrp myDir
i do not want to turn that w ON for the dir. Defeats the purpose. Nor do I want to turn on the sticky bit on the dir.
As well i checked my mounts and ensured that the file system that dir resides on (in this case /app) has no NOSUID set, so it's clean also. was not mounted with nosuid.
How can i fix this?