A
A
andr00xa2015-09-20 16:10:47
Access rights
andr00xa, 2015-09-20 16:10:47

What should be the rights / groups / users for / var / www?

Installed Ubuntu on the desktop, slowly migrating from Windows. Installed LAMP, now I want to deal with the rights to the /var/www folder. The owner/group has so far been set by www-data, the default permissions for folders/files are 755/644. But the problem is that from under my user there are no privileges to edit files.
Actually the question is: what canonical rights / owner / group should be on this folder so that Apache can read, and the user can edit?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2015-09-20
@andr00xa

How to properly set up apache on ubuntu?

A
Alexander Chernykh, 2015-09-20
@sashkets

I have /home/site/www
chmod 755 www
chown site:www www
in this way we edit the code under the site user (there are several people who need to do this), and the www group is read-only. if the site should write something to a folder, then we give it chmod 775,
as an admin I work as a user + su, so I don’t feel any discomfort.
but you can with sudo

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question