Answer the question
In order to leave comments, you need to log in
How to set permissions on a file in linux when creating it?
Good afternoon everyone, help in solving the problem, I have a samba share on ubuntu server 16.04, and differentiated access to folders (everyone sees only what he is allowed), the user creates files in a certain folder that must be edited by another user, after adding the second user in the group of the first and setting the rights to the file, the second user can edit, but how to create files for the first user so that each time you do not have to change the rights to the file, and the files are already created with certain permissions?
All users for the fileshare were created with the /bin/false option, so probably editing umask 0002 in the .profile file in the users home directory won't help
Thanks in advance for your replies
Answer the question
In order to leave comments, you need to log in
I don't remember if it works on balls, but try to assign acl to the directory. You can give each user both default and temporary rights, do not include them in groups. Example :
setfacl -d -m "u:username:rw-" /share
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question