Hi,
I have php script for creating files. It actually opens a file for writing and then copies the content for a template then the new file is chmod(ed) to 777. Now the main problem is with the permission. I need to set the permission of the folders as well of the files to 777 which makes it vulnerable. I was told by the server people to change the permission to 755 but doing so, the script doesnt work.
chown -R <username>:apache <directoryname>
chmod g+s <directoryname>
I asked my server administrator to execute the above commands, which he did but still the scripts are not executing. Its showing the error "fopen(test.php): failed to open stream: Permission denied" error(while trying to create the file test.php)
The whole thing is, to get the script execute without giving the folders a 777 permission. How should I go about for this.This is urgent and any help from you will be highly appreciated.