create file permission problem

From: Date: Wed, 13 Jun 2007 17:13:08 +0000
Subject: create file permission problem
Groups: php.general 
Request: Send a blank email to php-general+get-256890@lists.php.net to get a copy of this message
Hi Gang: I'm sure this is obvious to most, but not to me. I working on a virtual host. If I want to save data in a file, I can ftpconnect(); change the permissions of an existing file from 0755 to 0777; write to the file; and change the permissions of the file back to 0755 -- no problem. However, if a file is not there, then I can create one. However, the permissions of the file will be automagically set to 0600 and as such, I can't change them via ftpconnect(). In other words, I can't FTP in to my site and change the permissions of a file I created. I can delete the file, but that's all. How do you guys create a file and set its permissions working on a virtual host via php? Cheers, tedd PS: If I remember correctly, it was pretty easy in perl. Just try to open/write a file and if it wasn't there, it created one for you. But, it's been years since I did any perl stuff -- could be wrong. -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#256890) next »