What is the default directory where apache creates files? I am trying to create a simple text file, but i get an error: Permission denied. I wanted to know which directory is apache trying to create that file in?
Well, I am trying to create a text file through my python script which is executed by apache. I get an error "Permission denied" and i am not sure where apache is trying to create this file. Any help on this would be useful.
The script won't be allowed to create a .htaccess file via Apache. Access is restricted. The .htaccess should already be there under /home/username/public_html, if not, you can create it from cPanel >> 'File Manager' section.
Instead of creating the file directly under home directory, try to create the file under a folder inside the home directory. Give 777 permissions to that folder.