| | 10 | |
| | 11 | '''UPDATE''' |
| | 12 | |
| | 13 | After looking in code it becomes clear that MC takes local mask and use it to '''chmod''''ing a remote object: |
| | 14 | |
| | 15 | {{{ |
| | 16 | else if (!dst_exists) |
| | 17 | { |
| | 18 | src_mode = umask (-1); |
| | 19 | umask (src_mode); |
| | 20 | src_mode = 0100666 & ~src_mode; |
| | 21 | mc_chmod (dst_vpath, (src_mode & ctx->umask_kill)); |
| | 22 | } |
| | 23 | }}} |
| | 24 | https://github.com/MidnightCommander/mc/blob/master/src/filemanager/file.c#L1894 |
| | 25 | |
| | 26 | This happens with both SFTP and FISH VFSes which I tested. |
| | 27 | The correct behavior would be to not '''chmod''' at all when we deal with a remote VFS. So instead of: |
| | 28 | {{{ |
| | 29 | else if (!dst_exists) |
| | 30 | }}} |
| | 31 | there should be something like: |
| | 32 | {{{ |
| | 33 | else if (!dst_exists && !<vfs_is_remote>) |
| | 34 | }}} |
| | 35 | |
| | 36 | Unfortunately I don't know how to check is a vfs is remote. Please fix this. |