0

My php project reported error: unable to write file. I found that might be caused by permission guaranteed for directory containing my project files.

I did this:

sudo chown [username]:[username] -R [directory location]

and then restarted apache but nothing got changed even my /WWW is in home. Any help is appreciated :)

2 Answers2

1

I found that solution got fixed but only working for default /var/www directory: How to avoid using sudo when working in /var/www?

1
sudo chown -R www-data:www-data /home/$USER/www
sudo chmod -R 775 /home/$USER/www

Then add your user account to www-data group

sudo adduser $USER www-data
Tung Tran
  • 4,023