Summary: | API clarification SlaveBase::Copy permissions & umask for remote slaves | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Harald Sitter <sitter> |
Component: | general | Assignee: | David Faure <faure> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | kdelibs-bugs |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Harald Sitter
2020-03-05 14:46:02 UTC
Sounds good, but executables should remain executables, no? If the umask strips +x we really shouldn't put it back in, beyond that I'm fairly unopinionated on the matter. That being said, if we want to have +x preserved we kind of need a better separation of desired permission outcomes: - implicit permissions (the new default for boundary crossing copies): copyjob passes in the existing permissions and the slave must "create" with these AND must honor umask - explicit permissions (the default for non-boundary crossing copies): copyjob passes in permission and the slave must call chmod to ensure those permissions are applied regardless of umask - default permissions: same as implicit but the permissions are some default value implicit permission would then preserve the entire mode in so far as the umask doesn't strip bits. API changes I am thinking of: ``` Mode { Auto, /* boundary-crossing: Implicit; !boundary-crossing: Explicit */ Implicit, /* honor umask */ Explicit, /* override umask */ Default /* 644 */ } CopyJob::setPermissionMode(Mode) deprecated CopyJob::setDefaultPermissions(bool b) { setPermissionMode(b ? Default : Auto) } ``` On the protocol side I suppose we can simply add another value that carries the mode and deprecate SlaveBase::copy(QUrl,int,JobFlags) in favor of copy(QUrl,int,Mode,JobFlags) with the dispatch function taking care of compatibility. |