storage
storage copied to clipboard
[RFC] overlay: make sure directories omitted from layers have the right permissions
When extracting layer contents, if we find ourselves needing to implicitly create a directory (due to its not being included in the layer diff), try to give it the permissions, ownership, attributes, and datestamp of the corresponding directory from the layer which would be stacked below it.
When a layer omits any of the directories which contain items which that layer adds or modifies, this should prevent the default values that we would use from overriding those which correspond to the same directory in a lower layer, which could later be mistaken as an indication that one or more of those was intentionally changed, forcing the directory to be pulled up.
@vrothberg @mtrmac @giuseppe @saschagrunert PTAL
@nalind Waiting on you?
which could later be mistaken as an indication that one or more of those was intentionally changed, forcing the directory to be pulled up.
Another way to solve this possibly: Add an xattr to the directory like user.containers.meta (with serialized extended state, json/bincode/whatever) that would include to start a boolean value like synthetic: true that denotes this state, and we know hence when re-serializing to ignore that directory