Default ACL ignored while transferring file over SCP

Advertisement

Tom88
Guest

Default ACL ignored while transferring file over SCP

I have a directory on my debian based server with default ACL to make all group members able to write all new files:
user@server /some_path/app $ getfacl /some_path/app
# file: some_path/app
# owner: root
# group: developers
# flags: -s-
user::rwx
group::rwx
other::--x
default:user::rwx
default:group::rwx
default:group:www-data:r-x
default:mask::rwx
default:other::--x

When I ceate a new file via SSH session, everything is ok:
user@server /some_path/app $ touch t1.txt
user@server /some_path/app $ getfacl t1.txt
# file: t1.txt
# owner: user
# group: developers
user::rw-
group::rwx                     [b] #effective:rw-[/b]
group:www-data:r-x              #effective:r--
mask::rw-
other::---
Group developers can write to new file t1.txt

But when I create a file by WinSCP (new one (SHIFT+F4) or upload one from my windows desktop) the write privilages are not set:
user@server /some_path/app $ getfacl t2.txt
# file: t2.txt
# owner: user
# group: developers
user::rw-
group::rwx                      [b]#effective:r--[/b]
group:www-data:r-x              #effective:r--
mask::r--
other::---

What is more, when I create a file by WinSCP build-in console, the privileges are also OK (ACL is respected, developers can write the file). The problem is only while transferring a new file.
As in the post title - the conecition protocol is SCP, not FTP or SFTP.
I do not have checked an option "set privileges" in transfer settings. The problem occurs in all versions, including 5.17.8.
Am I missing something? How can I fix the problem?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

Re: Default ACL ignored while transferring file over SCP

Did you try using other SCP client? You would probably get the same behaviour. It believe it's server-side question, not WinSCP question.

Reply with quote

Tom88
Guest

Thanks for reply.
How could I think about using something else then WinSCP !? ;)

In fact I am using PSCP for some automated uploads and ewerythink works fine (group write bit is set correctly). I could try another one, but since there is at least one that works I think it is not a server problem.

Reply with quote

martin
Site Admin
martin avatar

Are you aware that pscp by default uses SFTP protocol (if the server supports it)? You have to use -scp switch to force it using the SCP.

Reply with quote

Advertisement

You can post new topics in this forum