Re: create file permission problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.          |
`------------------------------------------------------------'


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux