On Wed, 13 Jun 2001, [EMAIL PROTECTED] wrote:
> Thanks for pointing me in a better direction. I used this ...
> 
>  
> > $now = time;
> > utime $now, $now, @files; # sets access and modification time
> 
>  ... and expanded it to this ...
> 
> $now = time;
> 
> print $now;
> 
> @meters = ("test0612d.shtml");
> 
> foreach $file (@meters) {
>   
>         utime $now, $now, $file or print "Couldn't
> touch $file: $!\n";
> 
> }
> 
> At least now I'm getting an error message displayed in the web 
> browser. The error is: "Not Owner".
> 
> I made a symbolic link to the file I want to touch and then 
> proceeded to try to change ownership to the symbolic 
> link. I can only assume that the perl script I'm executing 
> has the owner "Nobody" when it is running. When I tried 
> to: 
> chown Nobody test0612d.shtml
>  ... I got the same error "Not Owner"
> 
> when I:
> 
> ls -l test0612d.shtml
> 
> ls -l work0513f.cgi
> 
> it says that I am the owner, so I should be able to 
> change the owner to Nobody, or at least change 
> the owner to "root". But every time I attempt it 
> I get the error "Not Owner".
> 
> Thanks for any help ...
> ~

with regards to symbolic links there are two types of functions. one that
follow symbolic links (they read/write, perform operation on the file that the
link is pointing to), and those that read/write perform operation on the actual
link itself. touch uses the stat system call which follows link. so you cannot
chown as the original file is probably not owned by you. 

use cgiwrap to authenticate and set  id of the cgi process instead of something
like this. setting a cgi script /html file to the same UID as the web sever is
not a good idea.
/kk

Reply via email to