php mkdir with 777 permission
$oldmask = umask(0);
mkdir("test", 0777);
umask($oldmask);
php mkdir with 777 permission
$oldmask = umask(0);
mkdir("test", 0777);
umask($oldmask);
mkdir permission denied php
/*
Here's what you do in Ubuntu
1. Make sure all files are owned by the Apache group and user. In Ubuntu it is the www-data group and user
2. sudo chown -R www-data:www-data /path/to/webserver/www
3. Next enabled all members of the www-data group to read and write files
4. sudo chmod -R g+rw /path/to/webserver/www
The php mkdir() function should now work without returning errors
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us