I have setup an Arch Linux machine with a user 'archie' with a primary group 'users' as:
useradd -m -g users archie
Whenever archie
creates a file in his ~/shared directory I want the group users
to get write permissions so I add:
setfacl -dm u::rw,g::rw,o::r ~/shared
Now when I'm logged in as archie
via ssh and create a file in ~/shared I can see that it works:
touch a.txt
ls -l
-rw-rw-r--+ 1 archie users 0 Dec 6 20:05 a.txt
However when I use scp
from my client the 'w' permission is not set to users
i.e.:
scp a.txt archie@192.168.0.1:/home/archie/shared
# now group users only got read permissions:
ls -l
-rw-r-r--+ 1 archie users 0 Dec 6 20:07 a.txt
I have no clue why I get this behaviour, shouldn't scp
kind of works the same way as being logged in with ssh?
How can I configure so I get the same behaviour with scp
?