Go Back   Velocity Reviews > Newsgroups > PERL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

PERL - chmod or setuid? Need to give script permission to write files

 
Thread Tools Search this Thread
Old 07-24-2003, 09:58 PM   #1
Default chmod or setuid? Need to give script permission to write files


Hi,
I am having a perl cgi script that needs to be able to create and
write a new file. Is there a way I can use chmod within the script to
give temporary world access to my directory, and then give it 755
access again right after? Would it be simpler to use some form of
switch user id? If you can, please put some specific perl code, since
I tried doing:

chmod oct "0777", "./images/thumbs";
$thumb->Write("$image_path/thumbs/$image_name");
chmod oct "0755", "./images/thumbs";

and this doesnt work. If there is a simple way of switching IDs,
could you please post the syntax, with say root id? Thank you very
much,
Mike Lubavin

PS I think this thread belongs in this forum, since I am asking perl
specific questions, dont redirect me to other forums instead of
answering please. Thanks!


Michael Lubavin
  Reply With Quote
Old 07-25-2003, 02:16 AM   #2
Steve Grazzini
 
Posts: n/a
Default Re: chmod or setuid? Need to give script permission to write files

Michael Lubavin <> wrote:
> PS I think this thread belongs in this forum, since I am asking
> perl specific questions, dont redirect me to other forums instead
> of answering please. Thanks!


It doesn't matter whether you think it's the right forum;
the only possible answer is "configure your webserver".

(I get the feeling that deep-down you knew that already.)

--
Steve
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump