Dan Ritter schreef op 22-12-2016 20:04:
On Thu, Dec 22, 2016 at 06:24:59PM +0100, Xen wrote:
I am trying to get a webserver to run under my regular user, or at
least to
have the website's files under control of my regular user, but the
webserver
runs as www-data.
But it seems I cannot do chgrp as a user.
Is there any way to achieve this?
I mean I could add my user's group to the www-data user and I guess
then I'd
have access but I don't really see how changing a file's group could
be a
security risk. Maybe I should add myself to www-data instead?
Yes, add your regular user to the www-data group, then log out
and come back in.
The web-server is a door in to your system. Limiting what it can
see is preferable.
Aye, thanks.
It just took me a while to figure out I could add myself to that group
instead, so I was concerned I would have to become root all the time in
order to do that sort of stuff.
Life becomes a whole lot easier if you can do stuff with your regular
user, which is why I am putting stuff in my user home directory in the
first place, instead of some central location.