I have my localhost running on
/var/www . My wordpress directory resides there. I was just trying to upload some media file on there, but it failed saying
Unable to create directory wp-content/uploads/2018/01. Is its parent directory writable by the server?
To solve this issue you just need to change the permission
use either one of this
sudo chmod 775 your_directory
sudo chmod 777 your_directory
in my case its sudo chmod 775 /var/www/. . ./wordpress/wp-content
775 will give all permission except write by anybody.
here’s a nice explanation why 775
400 read by owner
040 read by group
004 read by anybody
200 write by owner
020 write by group
002 write by anybody
100 execute by owner
010 execute by group
001 execute by anybody
400+040+004+200+020+100+010+001 = 775
whereas 777 give user,group and others to read,write and execute permission.
So from my opinion its better to use
Hope this will help. -THANKS