[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-AnyPerl] opening (creating) files on UNIX



On Tue, 11 Apr 2000 21:03:08 +1030, jakal wrote:

>I'm having some difficulties porting a MacPerl script to a UNIX server.
>Basically, on the Mac if I want to create a file I just use open(FILE,
>">>filename"). This works fine from the shell on UNIX, but when I try this
>in a CGI script, it doesn't like it. What am I doing wrong?

Probably file permissions. Er... of the directory. Don't you print out
$! if opening a file fails? It may seem awkward, it does to me anyway,
but you need EXECUTE (X) permission on the directory, in order to be
able to create a file, as well as write (W) permission to modify a file.

A CGI script is usually run as "nobody", so the file permissions of
"other" or "world" apply (lower 3 bits).

-- 
	Bart.

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org