Execute a script with root permission

Posted by Bastien974 on Server Fault See other posts from Server Fault or by Bastien974
Published on 2010-06-16T13:51:56Z Indexed on 2010/06/16 14:03 UTC
Read the original article Hit count: 254

Filed under:
|
|

Hi all,

I need a script that will chown/chmod some files. This script need to be executable by any user.

The problem is that those files are owned by different users, so it needs to be executed as root.

I tried the SUID so that any users with X permission can execute the script as root, but seems that it doesn't work with a bash script because of security issue.

How can I do that ? thanks.

© Server Fault or respective owner

Related posts about linux

Related posts about permissions