Reputation: 3134
What are the appropriate file permissions for a website which can be updated by either Git (e.g. core app files), FTP (e.g. plugins) or upload forms (e.g. images)?
Users involved:
Wordpress would be a good example:
FTP updates change the owner to ftpuser:ftpuser.
Uploaded images are assigned to the apache:apache user by default.
Git updates change everything to root:root.
Most people recommend 755 for folders and 644 for files, assuming everything is owned by the same user, which of course is not the case.
I could create an additional group named web, assign it to all of the above users and simply chown -R root:web
, but then I would have to set the default group to web for all these users, which is not something I'm comfortable with.
Upvotes: 1
Views: 274
Reputation: 5703
Upvotes: 1