0

Ok I feel like this is a very dumb question but after years of working with Ubuntu/LAMP I still don't know the answer.

Out of the box of course the Ubuntu LAMP server uses the www-data user for apache.

My question is how should I be handling ownership of these files if I am not actually using the www-data user for my own login?

If my username is aaron, then of course any files I create will be owned as aaron:aaron. What I have been doing is periodically changing ownership of all Web files to www-data:www-data. But is this the right way to do things?

I know the question seems ridiculous but I am just curious how others handle this type of thing.

Thanks!

1 Answer 1

0

If my username is aaron, then of course any files I create will be owned as aaron:aaron. What I have been doing is periodically changing ownership of all Web files to www-data:www-data. But is this the right way to do things?

No, don't do that, unless you need the web server to be able to modify those files. In most cases, that's unnecessary and a security downside. As long as the server can read them to serve them to the web, it doesn't matter who owns them.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .