Why file lose execute permission on Windows when it is transferred from Linux to Windows and vice versa?


Files in Linux and Windows are handled very differently. Windows does not know the executable bit of Linux file permissions. That information (including the other permissions) are lost when transferring files from Linux to Windows or vice versa.

Most probably the scp client at the Windows side sets the permissions of the copied files "the Windows way". That client runs as a specific user, which is then the the owner of the new files.The other way round it's the same; the scp client on the Linux side creates new files with the running user, the original permissions get lost.


There is no explicit one-one correspondence between Unix and Windows permissions, although they are analogous. Cygwin and MinGW exploit that analogy to imitate Unix permissions on top of Windows filesystems.

WinSCP could have been written to use that type of analogy when copying to Windows, but it relies on the inherited folder permissions when creating files rather than tweaking them to imitate the Unix file-permissions. That is where you "lose" information. Going back to Unix, it is configurable:

Further reading:


Its not such. I tried it several times and there is no loss in execution permission. But for your case you may try: chmod 777

try the above with root privilege is linux and then try to transfer it.


In linux, right click on the executable file and click on Permissions.

Check the box Allow Executing the file.

And try to execute the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.