"Greenhalgh David" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > You have left out some details, but from what I read above, this is
> > not a
> > perl issue.
> >
> > To clarify, you have a perl script that creates a text file. You then
> > open a
> > browser that downloads a Java applet from a remote server. You want
> > this
> > applet to read the local file. Correct?
> >
> > If so, then everything is working as expected. Because the browser
> > downloads
> > the applet from a remote server, the applet is not "trusted" by the
> > client
> > machine and the security mechanism disables disk IO for that applet
> > instance. It works when you run it locally because the browser trusts
> > applets that originate on the local machine.
> >
> > You have 3 options:
> >
> > 1. Sign the applet with a signature issued by a CA.
> >
> > 2. Become your own CA, sign the applet, and register your CA with the
> > client
> > browser.
> >
> > 3. lower or disable the security settings in the client browser.
> >
> > Again, your problem is not related to perl, so you could get more (
> > better )
> > information in the proper forum.
> >
> > Todd W.
> >
> >
> >
> It is a Perl issue I have. What is happening is that the Perl script is
> writing to a file, but it is writing to it as the WWW user. The text
> file is then used by the Java applet as an input. All this works, but I
> am not happy about having the permissions of the text file as allowing
> write access to the WWW user. What I would like to understand is how to
> set the permissions (or ownerships) from within the Perl script, so the
> psuedo code may look something like this:
>
> psuedo
> chmod 777 textfile.txt
> open textfile.txt for write
> write to the textfile.txt
> close textfile.txt
> chmod 644 textfile.txt
> end psuedo
>

Only root or the owner of a file can chmod its permissions. If you could do
what you say above, the whole permissions scheme would be pointless. If you
want the web server process to run as your account, you need your server
admin to  run CGI programs through SUEXEC or cgi-wrap or the like.

I misunderstood your OP, but again, this is not a perl issue. It is one of
permissions. You would have the same problem if your CGI script that creates
the file was written in python or ruby or even another java scriptlet.

Todd W.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to