Support staging with an arbitrary Unix modes
Context
With !177 (merged), casd allows clients to set the unix_mode property of a root directory to 0755 so that the directory is staged with those permissions instead of the default 0777.
0755 is the only value allowed, and is only considered for the root directory. However, the mechanism can be extended to accommodate other permissions and also to offer directory granularity.
As mentioned by @juergbi in this comment, this has a couple of technicalities, such as:
- Clients not knowing who the owner (uid) is, and
- if the
unix_modeis mangled, then staging and capturing would be lossy in terms of the original permissions
Task Description
Decide how the values set by the client should be interpreted, and rules and limitations for them.
Make HardLinkStager use the (derived) permissions when staging.
Acceptance Criteria
casd allows clients to set arbitrary (under certain constraints/interpretations) unix_mode properties for any directory to be staged