On Friday 21 November 2003 19:51 pm, Alexandr Malusek wrote:
Dylan
writes: On Friday 21 November 2003 18:18 pm, K V wrote: <SNIP>
The shell script is owned by root, and I set the permissions with chmod a+xs. It now looks like this:
-rwsr-sr-x 1 root root 56 2003-11-21 12:56 my_dialup_script
I thought the above permissions would cause the script to be executed as root, and therefore it should have permissions to create or modify the file /etc/resolv.conf.
It's true but, due to security reasons, this feature is disabled for shell scripts. I think a Perl script can be used instead but I haven't tested it.
AIUI the SUID flag sets the file to execute under the user who initiates it.
This is not true.
Thank you for clarifying the situation. It is a good day when we learn something. Dylan
-- A.M.
-- Sweet moderation Heart of this nation Desert us not We are between the wars - Billy Bragg