SUID not working

Hi

Senario: I have previleges to edit a file F but User B does not have sufficient privs to edit it.
In order for B to edit it I tried an indirect way. I created a script to edit F and SUID this script so that B can execute it with the privs of me. But this is not working . can some one help me out?

Thanks
Pankaj

i'd avoid suid scripts as much as possible ... you should check out sudo as that tool seems to be what you really need ...

Check rights for all directories in the full path to the script with SUID bit (x must be present for each of them)

SUID will not work when activated in shell script files. Try sudo instead, as Just Ice suggests.
Of course SUID vi is NOT recommended :slight_smile:
Regards.