Answer the question
In order to leave comments, you need to log in
How to grant all rights to a Debian user group?
I have 2 users: Me and my friend. Both of us are in a group that has read and write permissions to a certain folder, but at the same time, what he has on Windows, what I have on Linux, when saving a NEW file, we get "Unable to save: access denied". Everything happens over SFTP
Answer the question
In order to leave comments, you need to log in
and how does a friend from Windows write to Linux? what protocol? how is it configured?
Put SETGID on the folder. Then all files will be created under this group:
$ id user1
uid=1000(user1) gid=1000(user1) groups=1000(user1),1002(users)
$ id user2
uid=1001(user2) gid=1001(user2) groups=1001(user2),1002(users)
$ mkdir /tmp/shared
$ chgrp users /tmp/shared
$ touch /tmp/shared/f1
$ ll /tmp/shared/f1
-rw-rw-r-- 1 user1 user1 0 Oct 15 19:55 /tmp/shared/f1
$ chmod g+s /tmp/shared
$ touch /tmp/shared/f2
$ ll /tmp/shared/f2
-rw-rw-r-- 1 user1 users 0 Oct 15 19:55 /tmp/shared/f2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question