Re: create file permission problem

From: Date: Wed, 13 Jun 2007 17:23:13 +0000
Subject: Re: create file permission problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-256900@lists.php.net to get a copy of this message
On Wed, 2007-06-13 at 13:13 -0400, tedd wrote: > 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? See the following functions: http://ca.php.net/manual/en/function.umask.php http://ca.php.net/manual/en/function.chmod.php Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'

« previous php.general (#256900) next »