<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1001151" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1001151</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/deleting-files-perl#comment-1005026</link>
    <description> &lt;p&gt;Orpheus,&lt;/p&gt;
&lt;p&gt;Your probably right.  My server automatically runs my scripts as user &quot;ME.&quot;  That way I don&#039;t have to worry about anything.&lt;/p&gt;
&lt;p&gt;Create a file called whoami.cgi  Put the following code in it:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;code:&lt;/p&gt;
&lt;pre&gt;
#!/usr/bin/perl

BEGIN {
 use CGI::Carp qw(fatalsToBrowser);
}

use CGI qw(param header);
print header;

print `whoami`;
[/code]

If the script prints your username, then the scripts are ran with your rights, if the script does not return your username, contact your host and ask them to make your scripts run with your permissions, or switch hosts.

Hope that helped.

Richard

------------------
        &lt;a href=&quot;mailto:richard@brevig.com&quot; class=&quot;bb-email&quot;&gt;richard@brevig.com&lt;/a&gt;         

 &lt;a href=&quot;http://gimmeabuck.com&quot; class=&quot;bb-url&quot;&gt;http://gimmeabuck.com&lt;/a&gt;  - I&#039;ll give my buck...you give yours. lol &lt;/pre&gt;&lt;/blockquote&gt;</description>
     <pubDate>Thu, 15 Jun 2000 02:04:00 +0000</pubDate>
 <dc:creator>richjb</dc:creator>
 <guid isPermaLink="false">comment 1005026 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/deleting-files-perl#comment-1005025</link>
    <description> &lt;p&gt;CGI scripts are executed as user &quot;nobody&quot;. Unless your using SUSEXEC (is that right?). So if your server admin has set it so that you can&#039;t delete files as user &quot;nobody&quot; than it&#039;s impossible. &lt;/p&gt;
&lt;p&gt;Unless he&#039;ll activate that program, then you can execute commands as your own user name. &lt;/p&gt;
&lt;p&gt;But that&#039;s all useless if your on windows OS.  &lt;img src=&quot;http://www.webmaster-forums.com/ubb/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 14 Jun 2000 20:31:00 +0000</pubDate>
 <dc:creator>Orpheus</dc:creator>
 <guid isPermaLink="false">comment 1005025 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/deleting-files-perl#comment-1005024</link>
    <description> &lt;p&gt;I don&#039;t use the parenthesis, but I doubt that matters.  Also, I think it is only your example, but I don&#039;t believe PERL will handle relative paths like that?&lt;/p&gt;
&lt;p&gt;If you think it might be the permissions, try chmoding the file to 755 then deleting it:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;code:&lt;/p&gt;
&lt;pre&gt;
chmod(0755, &quot;../sites/$num.shtml&quot;);

unlink (&quot;../sites/$num.shtml&quot;);
[/code]

Hope that helped?

Richard

------------------
        &lt;a href=&quot;mailto:richard@brevig.com&quot; class=&quot;bb-email&quot;&gt;richard@brevig.com&lt;/a&gt;         

 &lt;a href=&quot;http://gimmeabuck.com&quot; class=&quot;bb-url&quot;&gt;http://gimmeabuck.com&lt;/a&gt;  - I&#039;ll give my buck...you give yours. lol &lt;/pre&gt;&lt;/blockquote&gt;</description>
     <pubDate>Wed, 14 Jun 2000 15:46:00 +0000</pubDate>
 <dc:creator>richjb</dc:creator>
 <guid isPermaLink="false">comment 1005024 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
