I am getting a permission denied error when i try to open a file for writing.
PHP Code:
$handle=fopen(dirname(__FILE__)."/photos/file.jpg","w");
The photos directory has the user and group set correctly and permissions are "rwx r-x r-x". I have also tried "rwx rwx r-x".. I cannot find out what is the issue here. I am using PLESK for my control panel.
Here is the error:
Code:
fopen(/var/www/vhosts/X/httpdocs/photos/file.jpg) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in /var/www/vhosts/X/httpdocs/index.php on line 411
|