![]() |
| Permissions skewed when uploading files through PHP |
|
cheryl
|
Hey everyone!
I have been doing some testing with uploading files in PHP and have found some good suggestions to override the default umask and ensure your files are viewable on the web. You can try changing your umask to by inserting the code: umask (0); in your script before the call to the upload in PHP. You can also run the chmod function after the upload to set the permissions to whatever you want: chmod ("yourfile", permissions); such as chmod ("/images/newimage.jpg", 644); You can find more information on chmod at http://us2.php.net/chmod |
||||||||||||
|
|
|||||||||||||
|
dan
HostMySite Tech
|
You can also use the Umask option to set PHP's Umask and have that used for when the files or directories are created:
http://us2.php.net/umask |
||||||||||||
|
|
|||||||||||||
| Permissions skewed when uploading files through PHP |
|
||
|


