unable to run script with owners privileges even after setuid bit is set and o+rx is provided
Hi, I have created a script with user Shyam and provided r-x to other and set the setuid bit for this file.
-rwsrwxr-x. 1 shyam shyam 53 Nov 26 14:43 shyam.sh
Script contains below :
echo Hello $USER
echo date
Hello $USER >> test.txt
shyam is able to run this but when yesh user runs the script 1st line gets executed but on 2nd line it says permission denied. Attaching a screenshot with some details. I am not sure what am I missing here in order to achieve -> yesh to successfully run the entire script. enter image description here