Re: Writing Files
| From: | Robert Cummings | Date: | Fri, 30 Aug 2002 15:18:48 +0000 |
| Subject: | Re: Writing Files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-114667@lists.php.net to get a copy of this message | ||
Georgie Casey wrote:
>
> How do you write files so that theyre chmoded 777 by default. the folders
> theyre written to are 0777 but the files aren't. so i cant delete or modify
> the files through PHP, i have to first chmod them with FTP, which takes
> ages.
There are a number of things you may find useful to read about in PHP:
chmod
chown
umask
Also you might want to look into the sticky bit for directories. Someone
feel like adding more about sticky bits... I'm pretty vague on them, just
know when they're set (and I don't remember how to) that files written
to the directory inherit group ownership.
Cheers,
Rob.
--
.-----------------.
| Robert Cummings |
:-----------------`----------------------------.
| Webdeployer - Chief PHP and Java Programmer |
:----------------------------------------------:
| Mail : mailto:robert.cummings@webmotion.com |
| Phone : (613) 731-4046 x.109 |
:----------------------------------------------:
| Website : http://www.webmotion.com |
| Fax : (613) 260-9545 |
`----------------------------------------------'