1

I have a VPS and I have to upload files my web application by SFTP connections.

I ofter have probems with permissions, when I upload files I have always to force a chown to move all my uploads to www-data user and group, to let apache handle it.

Is this the common way to do so? I don't think to set www-data as primary group is a good idea (my user do many other things a part of uploading file in www folder!).

1 Answer 1

0

One option would be to add the user account you’re uploading with to the www-data group:

sudo adduser ubuntu www-data

This will allow you to overwrite files owned by the Apache user without giving the web server elevated permissions.

You must log in to answer this question.

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