Summary: | Dolphin does not respect default umask settings of a SFTP server | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio-extras | Reporter: | Ralph Moenchmeyer <rm> |
Component: | SFTP | Assignee: | Andreas Schneider <asn> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | emmanuelpescosta099, regime_unsold498, sitter |
Priority: | NOR | ||
Version: | 18.04.3 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | patch for kio-extras |
Description
Ralph Moenchmeyer
2015-03-30 10:19:19 UTC
Thanks for the detailed bug report! :) Dolphin uses KIO (in this case the sftp ioslave) for all file operations, so this problem has to be fixed in the ioslave itself. I'll reassign it. Created attachment 91975 [details]
patch for kio-extras
This might fix the issue. But I do not have time to test that right now ...
What Andreas proposed wouldn't actually change anything. The open() isn't the problem. The process umask does apply when creating a file. The problem is the chmod() when the transfer is complete because chmod is not subject to umasking (otherwise you couldn't ever set more liberal permissions than the umask allows). The trouble is that we must chmod from an API POV. Permissions are either present or not, and when they are present they ought to be applied unless the file already exists on the remote. https://api.kde.org/frameworks/kio/html/classKIO_1_1CopyJob.html#a3bd4dda22a3bd50adf195542d9d009ad https://api.kde.org/frameworks/kio/html/classKIO_1_1SlaveBase.html#a1f382438285d8f1112e9340f3c0e8bbf When the client (e.g. dolphin) sets setDefaultPermissions=true the current code would behave exactly as expected and documented. But since the client does not, we ought to obey the API expectation that the permissions given to the sftp slave will be fully applied to the resulting file, hence the chmod. This is also in line with how this works for ftp (which is slightly more core than sftp). All that said, currently this is not a bug. This may change per bug #418499 *** Bug 471972 has been marked as a duplicate of this bug. *** |