0
I'm using Linux. On machine A I have such NFS setting in etc/exports
:
/home 10.0.129.130(rw,no_root_squash)
I mount this directory on machine A on /home/nfs/
on machine B. And I've set setuid using chmod u+x program1.sh
.
On machine B I want user xyz
to run the program1.sh
using root privilege. The setting of program1.sh
is like below:
-rwsr-x--- 1 root house 1299 May 15 23:54 program1.sh
, which contains mkdir -p /home/nfs/house/nsx/
I set xyz
to be in the group house
so that xyz
can run program1.sh
. However when running program1.sh
, it shows:
mkdir: cannot create directory `/home/nfs/house/nsx/': Permission denied
Running program1.sh
as root is OK. I don't know why it's not working with user xyz
.
I've set setuid using
chmod u+x
. Isn't this mean I can run this program as root. Likepasswd
, its privilege is-rwsr-xr-x
so other users can run that as root. – Marcus Thornton – 2014-05-19T06:12:11.443