everybody. I am attempting to write a PHP script that reads and creates files from the secure directory. That's, a directory that customers can't access. I place the "deny allInch within the .htaccess of stated directory, and PHP scripts can see files from that directory without error. However, I am unable to write files to that directory. I recieve a Permission Refused error after i use fopen using the "w" option.

Does anybody understand how to fix this?

Use is_writable() function in php to check on whether you've permission to create in a directory. Otherwise you should use chmod() to alter the permission and email it.

I believed it. I could not use chmod in the PHP script and alter permissions ("Operation not allowed"), I needed to chmod in the terminal and alter permissions. Just suggestions.