Re: File write/read problem

2003-09-25 Thread Hannes
On Wednesday, September 24, 2003, at 10:54 PM, [EMAIL PROTECTED] wrote: Now that sounds like that could be the overarching problem. It would also explain (I thingk) why I can't change the permissions of any of those directories with an ftp client. So if I change the ownership of the cgi-bin

Re: File write/read problem

2003-09-25 Thread Paul Hoffman
On Wednesday, September 24, 2003, at 10:44 PM, [EMAIL PROTECTED] wrote: OK, that makes perfect sense, but it is not working here. Here is a basic script which, when run, should create a new file called example.txt because it is not there when the open statement is used. #!/usr/bin/perl print

Re: File write/read problem

2003-09-25 Thread Ken Williams
On Thursday, September 25, 2003, at 12:33 AM, Greenhalgh David wrote: On Wednesday, Sep 24, 2003, at 20:05 Etc/GMT, Ken Williams wrote: Nope. When you open for reading (), it won't be auto-created. It will when you open for writing or appending ( or ). -Ken Not necessarily on every Mac. The

Re: File write/read problem

2003-09-25 Thread Mark Wheeler
: File write/read problem On Wednesday, September 24, 2003, at 10:44 PM, [EMAIL PROTECTED] wrote: OK, that makes perfect sense, but it is not working here. Here is a basic script which, when run, should create a new file called example.txt because it is not there when the open statement

Re: File write/read problem

2003-09-25 Thread Greenhalgh David
On Thursday, Sep 25, 2003, at 14:25 Etc/GMT, Ken Williams wrote: On Thursday, September 25, 2003, at 12:33 AM, Greenhalgh David wrote: On Wednesday, Sep 24, 2003, at 20:05 Etc/GMT, Ken Williams wrote: Nope. When you open for reading (), it won't be auto-created. It will when you open for

Re: File write/read problem

2003-09-25 Thread Paul Hoffman
, the user/group is set to www/www. So I need to change it to what? Mark - Original Message - From: Paul Hoffman [EMAIL PROTECTED] To: John Delacour [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, September 25, 2003 5:23 AM Subject: Re: File write/read problem On Wednesday

Re: File write/read problem

2003-09-25 Thread Mark Wheeler
PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, September 25, 2003 9:08 AM Subject: Re: File write/read problem Mark, Leave the permissions on httpd.conf as they are, in case you're tempted to change them. :-) After you've read this message, I suggest you read up on UNIX permissions -- maybe

File write/read problem

2003-09-24 Thread Mark Wheeler
Hi, This is my first post to this group. Please forgive me if this is the wrong group for this question. I've been coding for a short time (a year or so) and love it. I've been using other hosts for my scripts, and am now setting up my OSX server. I've run into a snag. I can't figure it out.

Re: File write/read problem

2003-09-24 Thread Hannes
On 9/24/03 6:37 AM, Mark Wheeler [EMAIL PROTECTED] wrote: Hi, This is my first post to this group. Please forgive me if this is the wrong group for this question. I've been coding for a short time (a year or so) and love it. I've been using other hosts for my scripts, and am now setting

Re: File write/read problem

2003-09-24 Thread Mark Wheeler
PROTECTED] Cc: Mark Wheeler [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 8:35 AM Subject: Re: File write/read problem On 9/24/03 6:37 AM, Mark Wheeler [EMAIL PROTECTED] wrote: Hi, This is my first post to this group. Please forgive me if this is the wrong group for this question

Re: File write/read problem

2003-09-24 Thread Doug McNutt
At 06:37 -0700 9/24/03, Mark Wheeler wrote: #!/usr/bin/perl -w use strict; print Content-type: text/html\n\n; print The contents of the file: brbr; open (DATA, example.txt) || die (Could not open file br $!); my @text = DATA; print @text; close (DATA); exit; If you're calling the script from

Re: File write/read problem

2003-09-24 Thread Mark Wheeler
- From: Hannes [EMAIL PROTECTED] To: Mark Wheeler [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 9:09 AM Subject: Re: File write/read problem On 9/24/03 7:57 AM, Mark Wheeler [EMAIL PROTECTED] wrote: Yes, I am running this as a cgi. I called it from a web browser. IE 6 on a PC. Yes

Re: File write/read problem

2003-09-24 Thread Mark Wheeler
glean from there. Thanks, Mark - Original Message - From: Adam Witney [EMAIL PROTECTED] To: Mark Wheeler [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 10:14 AM Subject: Re: File write/read problem Ah, good point! :-) although it may still be suffering line endings problems

Re: File write/read problem

2003-09-24 Thread Doug McNutt
At 07:57 -0700 9/24/03, Mark Wheeler wrote: Yes, I am running this as a cgi. I called it from a web browser. IE 6 on a PC. Yes, the script has no Mac line endings. I wrote it on a PC using a text editor. Peecee's use a CR/LF pair for line ends. If you uploaded it in ASCII mode with ftp it should

Re: File write/read problem

2003-09-24 Thread Mark Wheeler
OK, here's the latest. I put in the CGI::CARP...and got my errors to the screen. On both the read and write to the file (example.txt) if the file exists and the permissions are sett correctly, for example.txt, everything works great. BUT two things I noticed: 1. When I ftp a file to the cgi-bin,

Re: File write/read problem

2003-09-24 Thread John Delacour
At 7:57 am -0700 24/9/03, Mark Wheeler wrote: Yes, I am running this as a cgi. I called it from a web browser. IE 6 on a PC. Yes, the script has no Mac line endings. I wrote it on a PC using a text editor. I've done nothing different than I have for all my other scripts. I just don't understand.

Re: File write/read problem

2003-09-24 Thread John Delacour
At 11:54 am -0700 24/9/03, Mark Wheeler wrote: .. I was under the impression that when I used the or or in an open command i.e.: open (DATA, example.txt); that it would creat the file if it wasn't there (with the appropriate [default?] permissions...at least that's what happens on my other

Re: File write/read problem

2003-09-24 Thread Mark Wheeler
OK, that makes perfect sense, but it is not working here. Here is a basic script which, when run, should create a new file called example.txt because it is not there when the open statement is used. #!/usr/bin/perl print Content-type: text/html\n\n; print Creating new file...; my $newtext =

Re: File write/read problem

2003-09-24 Thread Paul McCann
Hi Mark, you wrote... Permission denied at /Library/WebServer/CGI-Executables/write.cgi All the permissions for each of these directories are 755. Something is a miss. So what can I do?! I'm very confused. There's your problem. 755 will not allow the www user (or whatever you've

Re: File write/read problem

2003-09-24 Thread musicarr
Ok, I'll make a new directory inside the cgi-bin, and set it to 777, and try to write to that. A side note, though. I should be able to write directly to the cgi-bin, though, right? I tried to set the cgi-bin directory to 777, and was not able to. I received an error, so something else is

Re: File write/read problem

2003-09-24 Thread musicarr
Now that sounds like that could be the overarching problem. It would also explain (I thingk) why I can't change the permissions of any of those directories with an ftp client. So if I change the ownership of the cgi-bin (and all the folders associated with the server) to www:www, then I