Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I have the following lines in a script
#!/bin/perl $path = "/home/private/commondata/mydir"; $path =~ /(.+)/; $path = $1; print $path; system "mkdir","-p","$path";
I have done "chmod +s myscript" to set the setuid bit, and the script is in /home/private area with the permissions of "private" itself.I want that when any user runs the script, it sohuld run with the permission of "private" and make the directory commondata/mydir.
But when i run the script, i have the folowing error mkdir: "/home/private/commondata/mydir": Permission denied
I dont understand , as if i am correct after setting the setuid bit, the script will have the permission to write in the area with "private" permission!!!!
Thanks for your help in Advance
20040623 Edit by Corion: Added formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: permisson prob in suid script
by pbeckingham (Parson) on Jun 23, 2004 at 11:53 UTC | |
by Anonymous Monk on Jun 23, 2004 at 16:33 UTC | |
by pbeckingham (Parson) on Jun 23, 2004 at 17:21 UTC | |
|
Re: permisson prob in suid script
by tbone1 (Monsignor) on Jun 23, 2004 at 13:15 UTC | |
by Anonymous Monk on Jun 23, 2004 at 16:29 UTC |