SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 1999
    Location
    Milan, Italy
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've created a website managment perl script which creates webpages simply filling out an html form. My problem is that know I'm not the owner of this files and i cannot edit, remove or download those perl generated files. Someone could help me?

    Thanks in advance,
    Simone

    ------------------
    Simone Lippolis
    <A HREF="http://hotmc.com/hs]http://hotmc.com/hs[/URL" TARGET=_blank>
    [URL=http://www.netvision.it]http://www.netvision.it</A>
    s.lippolis@hotmc.com



  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You need to find a utility that will let you log on as user Nobody. There is a script that does this located at cgi.resourceindex.com. Not sure under which category but I do remember seeing it. Also if you install a perl module called cgiwrap on your server then the new files would be created under your user account and you would have full access to them.

    ------------------
    Wayne Luke

    The Majormud Encyclopedia - www.bloodquest2.com
    Come Play one of the hottest games on the net.


  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 1999
    Location
    Milan, Italy
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks,

    I've allready installed those script, but it does not work properly (or I use the wrong sintiax):

    chown my_username /path/to/files/*

    and then

    chmod 777 /path/to/files/*

    both commands retirns me a "256" error code.

    Thanks again,
    Simone

    ------------------
    Simone Lippolis
    <A HREF="http://hotmc.com/hs]http://hotmc.com/hs[/URL" TARGET=_blank>
    [URL=http://www.netvision.it]http://www.netvision.it</A>
    s.lippolis@hotmc.com



  4. #4
    Destiny Manager Plebius's Avatar
    Join Date
    Nov 1999
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the files are created as though they are owned by the webserver, so what you need is an admin script you can run from the web that will allow you do delete the files from the web instead of from FTP. Here is a simple one. call it by using yourserver.com/cgi-bin/nameofscript.pl?password&/system/path/to/file

    #!/usr/bin/perl

    $password = 'something';

    ($qpass, $file) = split(/\&/, $ENV{'QUERY_STRING'});

    print "Content-Type: text/plain\n\n";

    if ($qpass ne $password)
    {
    print "Incorrect Password\n";
    exit;
    }

    if (unlink($file))
    {
    print "Delete successful\n";
    }
    else
    {
    print "Delete failed\n";
    print "Reason: $!\n";
    }


    [This message has been edited by LuZeR (edited January 19, 2000).]

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 1999
    Location
    Milan, Italy
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot!
    I've changed a line of the script. The first version included a:

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>chmod(777,"$myfile");[/code]

    now, removing this line, I'm able to delete and download new generated .shtml pages. I don't know why but it works!

    Thanks to all for your support!

    Simone



    ------------------
    Simone Lippolis
    s.lippolis@hotmc.com
    http://hotmc.com/hs
    http://www.netvision.it


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •