1
votes

It may be a duplicate question(Sorry if it is really). Actually I am working with a file permission issue with IIS server and PHP.

I uploaded a PDF file and move that to upload directory successfully. But now when I given link to an uploaded file like http://mydomain.com/application/upload/test.pdf, it gives an 500 internal server error. My code exist in application directory.

I logged into server and give the upload directory and files give permissions the file downloaded.

But when I upload a new file it happened again for that file. So, how can I set the proper permission for each file I upload.

Any hint is appreciated. Thanks.

1
Anybody has an answer yet? I'm experiencing the same problem and don't want to duplicate question.secuaz

1 Answers

0
votes

After file uploading also give the uploading script permission of 755

chmod("/path/to/your/youruploadedfile", 755);

http://www.php.net/manual/en/function.chmod.php