On Monday 10 May 2004 05:20 am, Mario wrote: > Anyways I was wondering if there is a way to upload through PHP without > having "write" permission to "all". Is there a way maybe, for the script, > to change permission to "write" before the upload and then take it off? or > anything else I can do to protect the dir?
You could keep your upload directory with 777, but after uploading move files to safer directory with stricter file permissions. You could probably even get away with just changing the permission of the file after it was uploaded. http://php.net/filesystem http://php.net/manual/en/function.chmod.php // Read and write for owner, read for everybody else chmod("/somedir/somefile", 0644); James Hicks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php