Allowing your local server access to your dev folder

Occasionally you will need www-data to write to your dev folder – for example uploading docs or perhaps creating a text log.

If you house your dev folder outside the server, for example Apache, and symbolically link to it the original folder is still owned by the user and group that originally created it – as you would expect.

To enable your local web server to write to your dev folder you could make your group owner the original owner, add www-data to the original owner’s group and make www-data the user of your dev folder and keep the group the same. Here are the commands:

Add user to group

usermod -a -G some-group www-data

Make group some-group and make www-data the user

chown -R some-group:www-data /your/dev/folder