[PHP] cannot get php through apache to write to my home dir on shared server

2003-06-26 Thread frank reeves
Hi,

I have an account on shared server and am trying to
write a logfile (a dump of an email which i use mail()
to send) to a logfile in my home dir.  This logfile
will grow with all emails send by my app and will thus
give me an archive of sorts.

However, because php is executed through apache as
user nobody it does not have permission to write to my
linux home dir (fopen(log.file,a)) fails with
permission denied). I dont want to open my home dir to
the world to allow this operation but I also dont want
to write my log to /var/tmp as user nobody.

Does anyone know how I can get php to write as me to
my home dir ?

I suppose i could write a shell script and have my app
call this but that seems a bit convoluted.

Thanks in advance,
-- frank

=



Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] cannot get php through apache to write to my home dir on shared server

2003-06-26 Thread CPT John W. Holmes
From: frank reeves [EMAIL PROTECTED]
 I have an account on shared server and am trying to
 write a logfile (a dump of an email which i use mail()
 to send) to a logfile in my home dir.  This logfile
 will grow with all emails send by my app and will thus
 give me an archive of sorts.

 However, because php is executed through apache as
 user nobody it does not have permission to write to my
 linux home dir (fopen(log.file,a)) fails with
 permission denied). I dont want to open my home dir to
 the world to allow this operation but I also dont want
 to write my log to /var/tmp as user nobody.

 Does anyone know how I can get php to write as me to
 my home dir ?

You can only get this with PHP as a CGI.

 I suppose i could write a shell script and have my app
 call this but that seems a bit convoluted.

Other option is to read/write the file over FTP, since you'll be able to log
in as you.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] cannot get php through apache to write to my home dir on shared server

2003-06-26 Thread Steve Buehler
Another option might be to create a directory in your web space to hold 
your file and open up just that directory as 777.

Steve

At 08:17 AM 6/26/2003 -0400, you wrote:
From: frank reeves [EMAIL PROTECTED]
 I have an account on shared server and am trying to
 write a logfile (a dump of an email which i use mail()
 to send) to a logfile in my home dir.  This logfile
 will grow with all emails send by my app and will thus
 give me an archive of sorts.

 However, because php is executed through apache as
 user nobody it does not have permission to write to my
 linux home dir (fopen(log.file,a)) fails with
 permission denied). I dont want to open my home dir to
 the world to allow this operation but I also dont want
 to write my log to /var/tmp as user nobody.

 Does anyone know how I can get php to write as me to
 my home dir ?
You can only get this with PHP as a CGI.

 I suppose i could write a shell script and have my app
 call this but that seems a bit convoluted.
Other option is to read/write the file over FTP, since you'll be able to log
in as you.
---John Holmes...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
This message has been scanned for viruses and
dangerous content by the MailScanner at ow4, and is
believed to be clean.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php