[PHP] create a chmod'd file

2003-06-13 Thread Matt Palermo
I have a script that creates a php file based on user input. I need this newly created file to have write permissions - chmod 777. How can I have the script create the file with these permissions already set? Is this possible? Thanks, Matt

Re: [PHP] create a chmod'd file

2003-06-13 Thread Alex Earl
I have a script that creates a php file based on user input. I need this newly created file to have write permissions - chmod 777. How can I have the script create the file with these permissions already set? Is this possible? Thanks, Matt How are you creating the file? fopen()?

RE: [PHP] create a chmod'd file

2003-06-13 Thread Jay Blanchard
uh, could it be... http://us3.php.net/manual/en/function.chmod.php -Original Message- From: Matt Palermo [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2003 1:36 PM To: [EMAIL PROTECTED] Subject: [PHP] create a chmod'd file I have a script that creates a php file based on user input

Re: [PHP] create a chmod'd file

2003-06-13 Thread Matt Palermo
- Original Message - From: Alex Earl [EMAIL PROTECTED] To: Matt Palermo [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, June 13, 2003 2:37 PM Subject: Re: [PHP] create a chmod'd file I have a script that creates a php file based on user input. I need this newly created file to have write

RE: [PHP] create a chmod'd file

2003-06-13 Thread Jay Blanchard
[snip] I am using the fopen(), then using fwrite() to write text to it. After this I am trying this command which doesn't work: chmod($filename, 0777); But, this doesn't work, and I'm not sure how to go about chmod'ing the file for these permissions so that it can be changed later on. [/snip]

Re: [PHP] create a chmod'd file

2003-06-13 Thread Jason Wong
On Saturday 14 June 2003 02:43, Matt Palermo wrote: I am using the fopen(), then using fwrite() to write text to it. After this I am trying this command which doesn't work: chmod($filename, 0777); But, this doesn't work, and I'm not sure how to go about chmod'ing the file for these

Re: [PHP] create a chmod'd file

2003-06-13 Thread Matt Palermo
] Sent: Friday, June 13, 2003 2:59 PM Subject: Re: [PHP] create a chmod'd file On Saturday 14 June 2003 02:43, Matt Palermo wrote: I am using the fopen(), then using fwrite() to write text to it. After this I am trying this command which doesn't work: chmod($filename, 0777

Re: [PHP] create a chmod'd file

2003-06-13 Thread Jason Wong
On Saturday 14 June 2003 03:01, Matt Palermo wrote: It just doesn't chmod the file. It doesn't produce errors except for later on in the script when it says it can't access the file with write permissions (but it should already be chmod'd by then). Thanks. If chmod() fails I'm pretty sure it

RE: [PHP] create a chmod'd file

2003-06-13 Thread Jay Blanchard
[snip] It just doesn't chmod the file. It doesn't produce errors except for later on in the script when it says it can't access the file with write permissions (but it should already be chmod'd by then). Thanks. [/snip] What are the permissions of the script producing the file? Does it have the

RE: [PHP] create a chmod'd file

2003-06-13 Thread Matt Palermo
How do I get the script to own the file? Are there special commands needed for this? Matt -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2003 3:08 PM To: Matt Palermo; [EMAIL PROTECTED] Subject: RE: [PHP] create a chmod'd file [snip] It just

RE: [PHP] create a chmod'd file

2003-06-13 Thread Matt Palermo
What is the umask()? What is that used for? How do I set that up right? Matt -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2003 3:08 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] create a chmod'd file On Saturday 14 June 2003 03:01, Matt Palermo

Re: [PHP] create a chmod'd file

2003-06-13 Thread John Nichel
Matt Palermo wrote: I need this newly created file to have write permissions - chmod 777. First, if you just need to write to it, don't chmod it to 777 (you're giving rwx across the board doing that). Who needs to write to the file? The webserver only? Then set the permissions to 600,