Opened on Nov 1, 2013 at 12:24:45 PM
Closed on Nov 20, 2013 at 4:33:09 PM
Last modified on Feb 21, 2014 at 8:07:33 PM
#7538 closed defect (worksforme)
Permissions not preserved when editing remote file via sftp connection
Reported by: | majashdown | Owned by: | dkocher |
---|---|---|---|
Priority: | normal | Milestone: | 4.4.4 |
Component: | core | Version: | 4.4 |
Severity: | normal | Keywords: | |
Cc: | Architecture: | Intel | |
Platform: | Mac OS X 10.9 |
Description
When editing a remote file via an sftp connection, the permissions of the file are not preserved when uploading the file. They are always reset to rw-r--r--. This always happens, regardless of the settings in the Transfers preferences.
This behaviour does not happen in version 4.3.1.
Attachments (1)
Change History (25)
comment:1 Changed on Nov 1, 2013 at 1:08:09 PM by dkocher
- Milestone set to 4.4.1
- Owner set to dkocher
- Status changed from new to assigned
comment:2 Changed on Nov 1, 2013 at 4:33:59 PM by dkocher
- Resolution set to fixed
- Status changed from assigned to closed
comment:3 follow-up: ↓ 4 Changed on Nov 20, 2013 at 2:23:20 PM by michael vöhringer
- Resolution fixed deleted
- Status changed from closed to reopened
I can reproduce this but with the latest Snapshot (14063). Is this fixed in v 14063 ?
comment:4 in reply to: ↑ 3 Changed on Nov 20, 2013 at 2:57:50 PM by dkocher
Replying to michael vöhringer:
I can reproduce this but with the latest Snapshot (14063). Is this fixed in v 14063 ?
On Windows?
comment:5 follow-up: ↓ 7 Changed on Nov 20, 2013 at 3:00:05 PM by michael vöhringer
no, its OSX 10.9
comment:6 Changed on Nov 20, 2013 at 3:07:22 PM by dkocher
Additional fix when local filesystem does not support UNIX permissions in r14079.
comment:7 in reply to: ↑ 5 Changed on Nov 20, 2013 at 3:07:56 PM by dkocher
Replying to michael vöhringer:
no, its OSX 10.9
I cannot reproduce the issue on OS X with build 14063 and later.
comment:8 Changed on Nov 20, 2013 at 3:08:28 PM by dkocher
Please post the transcript from the log drawer (⌘-L).
comment:9 Changed on Nov 20, 2013 at 3:11:53 PM by dkocher
- Milestone changed from 4.4.1 to 4.4.2
comment:10 Changed on Nov 20, 2013 at 3:20:16 PM by michael vöhringer
How to reproduce:
- Open sftp connection to remote host (linux)
- create a file test.txt
- change the owner of the file to something different (for example www-data if you are connected as root via sftp)
- Open the file with the "editor"-icon in cyberduck
- save the file.
-> on my system the owner changed from www-data to root and the permission to "-rw-r--r--" after saving the file
SSH_FXP_READDIR SSH_FXP_STATUS SSH_FXP_CLOSE SSH_FXP_STATUS SSH_FXP_OPEN SSH_FXP_HANDLE SSH_FXP_READ SSH_FXP_DATA SSH_FXP_READ SSH_FXP_STATUS SSH_FXP_CLOSE SSH_FXP_STATUS SSH_FXP_STAT SSH_FXP_ATTRS SSH_FXP_STAT SSH_FXP_ATTRS SSH_FXP_OPEN SSH_FXP_HANDLE SSH_FXP_WRITE SSH_FXP_STATUS SSH_FXP_CLOSE SSH_FXP_STATUS SSH_FXP_STAT SSH_FXP_ATTRS SSH_FXP_REMOVE SSH_FXP_STATUS SSH_FXP_RENAME SSH_FXP_STATUS SSH_FXP_SETSTAT SSH_FXP_STATUS
comment:11 Changed on Nov 20, 2013 at 3:22:43 PM by michael vöhringer
FYI: i can not reproduce this, if i only download/upload the file.
comment:12 follow-up: ↓ 17 Changed on Nov 20, 2013 at 3:29:43 PM by dkocher
Thanks for the transcript. We see one SSH_FXP_SETSTAT being sent after the upload is complete. We would expect it two times, once to set the timestamp and once for the permissions.
comment:13 Changed on Nov 20, 2013 at 3:48:02 PM by dkocher
I can reproduce this only when setting Preferences → Uploads → Change permissions → to these permissions: and uncheck all checkboxes. With this setting no permissions are updated after the upload is complete.
comment:14 Changed on Nov 20, 2013 at 3:49:39 PM by dkocher
Can you find any error output in the system.log (/Applications/Utilities/Console.app) from Cyberduck?
Changed on Nov 20, 2013 at 4:03:14 PM by michael vöhringer
comment:15 Changed on Nov 20, 2013 at 4:05:15 PM by michael vöhringer
comment:16 Changed on Nov 20, 2013 at 4:10:19 PM by dkocher
Thanks for the screenshot. You will have to set Change permissions for Downloads otherwise the edited file will have the default mode 644 on OS X.
comment:17 in reply to: ↑ 12 Changed on Nov 20, 2013 at 4:11:01 PM by dkocher
Replying to dkocher:
Thanks for the transcript. We see one SSH_FXP_SETSTAT being sent after the upload is complete. We would expect it two times, once to set the timestamp and once for the permissions.
Actually expected because setting the timestamp explicitly for uploads is disabled by default.
comment:18 Changed on Nov 20, 2013 at 4:11:21 PM by dkocher
- Resolution set to fixed
- Status changed from reopened to closed
comment:19 follow-up: ↓ 20 Changed on Nov 20, 2013 at 4:30:31 PM by michael vöhringer
- Resolution fixed deleted
- Status changed from closed to reopened
ok, the permissions are stable after i set Download->Change permissions, but the user of the online-file changed. I can reproduce this only if use the edit function within cyberduck. When download/upload via drag&drop the permission/user/group did not change online.
Permission before editing the file:
-rw------- 1 www-data root 41 Nov 20 17:20 test.txt
Permission after saving the file in Sublime
-rw------- 1 root root 47 Nov 20 17:23 test.txt
comment:20 in reply to: ↑ 19 Changed on Nov 20, 2013 at 4:33:09 PM by dkocher
- Resolution set to worksforme
- Status changed from reopened to closed
Replying to michael vöhringer:
ok, the permissions are stable after i set Download->Change permissions, but the user of the online-file changed. I can reproduce this only if use the edit function within cyberduck. When download/upload via drag&drop the permission/user/group did not change online.
Permission before editing the file:
-rw------- 1 www-data root 41 Nov 20 17:20 test.txtPermission after saving the file in Sublime
-rw------- 1 root root 47 Nov 20 17:23 test.txt
Yes, this is expected because of the temporary rename feature enabled by default for edits. See hidden property editor.upload.temporary to disable the use of temporary name on upload when uploading changes from the editor on save.
defaults write ch.sudo.cyberduck editor.upload.temporary false
comment:21 Changed on Nov 20, 2013 at 4:34:12 PM by dkocher
Handling of file owner related to #15.
comment:22 Changed on Nov 20, 2013 at 4:44:48 PM by michael vöhringer
thank you very much, after setting "editor.upload.temporary false" the edit works as (I) expected. Now the behavior of V 4.3 is back.
comment:23 Changed on Feb 21, 2014 at 3:42:14 PM by daniel bleisch
Still doesn't work with 4.4.3.
"defaults write ch.sudo.cyberduck editor.upload.temporary false"
helps to prevent the file-owner, but still changes the permissions from 0755 to 0644.
comment:24 Changed on Feb 21, 2014 at 8:07:33 PM by dkocher
- Milestone changed from 4.4.2 to 4.4.4
In r14207.
In r13733 and r13736.