Created
February 2, 2022 08:46
-
-
Save ayoubjamouhi/479feb7929605d2293b4a7d447050538 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I know this is an old thread, but it needs a better answer. You shouldn't need to set the permissions to 777, that is a security problem as it gives read and write access to the world. It may be that your apache user does not have read/write permissions on the directory. | |
Here's what you do in Ubuntu | |
Make sure all files are owned by the Apache group and user. In Ubuntu it is the www-data group and user | |
sudo chown -R www-data:www-data /path/to/webserver/www | |
Next enabled all members of the www-data group to read and write files | |
sudo chmod -R g+rw /path/to/webserver/www | |
The php mkdir() function should now work without returning errors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment