You must allow the Apache user (usually www-data
) to create files in that directory. This can be accomplished by making Apache the owner of the directory, for example, if the directory were called my-dir
, you would open a terminal and run this:
sudo chown www-data my-dir
manpreet
Best Answer
2 years ago
I am trying to save data using HTML and PHP in localhost in Ubuntu. My HTML & PHP files are working great but when I am using commands to open a file in the localhost using
it does not allow it to create it, but the PHP file is working and when set with commands to output variables from PHP it works well.
How to permit PHP to create files in Apache in localhost Ubuntu.