Permissions as set by cygwin's chmod not being copied

Advertisement

laggingreflex
Joined:
Posts:
8

Permissions as set by cygwin's chmod not being copied

I'm using WinSCP.com /command keepuptodate to keep a folder in sync with a server. I have several .sh script files which should have +x permissions and I've set them as such using cygwin's chmod and they indeed show +x when using cygwin's ls, but when the file is transferred by WinSCP it doesn't have the same permissions on the server. Also changing the permissions doesn't trigger keepuptodate.

Is it possible to sync permissions?

Reply with quote

Advertisement

laggingreflex
Joined:
Posts:
8

Just to clarify, I'm setting +x permission on a new file on my Windows machine and expecting that the +x permission will be copied to the remote server. But the file on the server only has +r permissions and I have to manually chmod +x on the server. After that it's fine, it doesn't unset the remote file's +x after further changes to the file are synced. I'm guessing the current default behavior is not to alter permissions at all on the server, or to leave the permissions as they were on the server for a file if it already existed, right?

So is it possible to actually keep the file permissions in sync also?

I also wouldn't want to use -permissions=0777 on all files, I just want it to copy the files' original permissions as set by cygwin on Windows (client) to the server.

Reply with quote

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

Re: Permissions as set by cygwin's chmod not being copied

The primary problem that WinSCP as a native Windows application is not aware of Cygwin permissions.

Reply with quote

Advertisement

You can post new topics in this forum