if $path is correct, why could it happen?
Warning: chmod(): Operation not permitted
you dont have sufficient permissions.
that's right...
I've chmoded -R a+w from shell the directory in which I need php to write and it can,now.
But php could not yet chmod files: is there a way to identify php user in order to grant him corect permissions?
This could be very useful :
I am having horrible problems with Plesk and file permissions. It seems way too restrictive. We have had to resort to using PHP's FTP commands in order to create folders on a website, but even after we create a folder, once we try to place an image in that folder, we are unable to do so. We try to chmod the newly created directory to 777, but are only able to do so when we log in to FTP and not in our PHP code. Has anyone else run into these problems and have a solution for how to ease up the file restrictions? This seems like overkill.
login ssh and chown apache:apache the folders in which php needs to edit files.
If this is your server then I would suggest at the least installing mod_security to help protect some of the content.
That works.
Other info for Plesk :
plesk forum