I am getting the following error in my code.
Message: mkdir(): Permission denied
I have tried other solutions which i found in stackoverflow and following commands:
$ ls -ald /var/www
drwxrwsr-x 7 root root 4096 Apr 23 13:58 /var/www
$ ls -ald /var/www/html
drwxrwsr-x 4 root root 4096 Apr 26 10:02 /var/www/html
$
I referred below document of AWS AWS User Guide
Update:- I can create it from command line. Problem is when i execute my php code i am getting this error.
Which user are you logged in as (find out with whoami
). The user and group of these directories are root
and there is no write permission for "other".
Possible solutions:
sudo
in front of the command to execute mkdir
as rootchown
/ chgrp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With