Ron Goral wrote:
chmod 0666 is the right thing. Thank you. However, I am not able
to do that programmatically when the script is running in secure
mode. The following dies:
$file_path = qq[/usr/wwws/htdocs/mydomain/cgi-bin/logs/errs.log];
chmod 0666,$file_path or die "Cannot chmod $file_path - $!";
However, in "unsecure" mode, this succeeds:
$file_path = qq[/home/username/mydomain-www/cgi-bin/logs/errs.log];
chmod 0666,$file_path or die "Cannot chmod $file_path - $!";
That's another problem. Note that this is getting rather off topic for
a Perl list.
I was assuming that you simply could change the permissions when
logged in via FTP or SSH. To do it via a CGI script, the file must be
owned by the user CGI is run as, i.e. the file typically needs to have
been created by the script. Is that the case?
Still assuming that we are talking about 'physically' the same file,
i.e. that /usr/wwws/htdocs/mydomain is a symlink to
/home/username/mydomain-www, I really don't know why the first example
above dies. What does the error log say?
Can it possibly be that CGI is running as a different user under HTTPS
compared to HTTP?
But again, this is *very* off topic here.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>