How to allow easy editing of www-data owned files by a user

Xen list at
Wed Dec 6 15:13:35 UTC 2017

On Wed, 6 Dec 2017, Chris Green wrote:

> I have a directory 'wiki' in my home directory which is the root of
> the whole DokuWiki installation.  There is a link from /srv to
> /home/chris/wiki so that apache2 serves the wiki on the web.

Also dokuwiki user :p.

>    # Set so users chris and www-data can do anything everywhere
>    #
>    setfacl -R -m u:chris:rwx wiki
>    setfacl -R -m u:www-data:rwx wiki
>    #
>    #
>    # Set so new files and directories have the same permissions
>    #
>    setfacl -R -d -m u:chris:rwx wiki
>    setfacl -R -d -m u:www-data:rwx wiki

So you keep mixed ownership but full permissions for everyone and the mods 
are auto.

So you don't need any chmod script but you could still do a find & chown,

But did you know that in the past, user homes were always created g+s?

You can find traces of it in /etc/default/skel or similar.

This thing really needs a better default solution though, I mean something 

The use case is pretty universal and trying to solve all of the 
applications would be undoable.

More information about the ubuntu-users mailing list