Answer the question
In order to leave comments, you need to log in
How to set write permissions correctly?
There is a directory /var/www . This directory and its subdirectories and files have permission 0775, and the owner is www-data. I shared this directory in Samba, but there were problems with writing new files and changing existing files, because 0775.
When I change it to 0777, everything works out.
How can I make the www-data user have read-only permissions, and Samba can write, read and modify?
- - - - -
UPD:
For a shared resource, I specified a user and a group on behalf of which any connected user will read / write / change, and write permissions. Everything worked. It turned out like this:
[share]
path = /var/www
inherit permissions = yes
force group = www-data
force user = www-data
create mask = 0644
directory mask = 0755
Answer the question
In order to leave comments, you need to log in
You should probably make Samba the owner of this directory. Use commandchown
sudo chown Samba:Samba /var/www
sudo chmod 755 /var/www
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question