Preserve file permissions in fakefs after add_real_file #1138
Replies: 3 comments
-
Thanks, I will have a look! |
Beta Was this translation helpful? Give feedback.
-
Ok, I completly forgot that this is expected behavior. By default, files from the real filesystem are mapped as read-only. From the documentation:
Replacing |
Beta Was this translation helpful? Give feedback.
-
Converting this to a discussion issue. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Suppose I have a real file
/usr/bin/env
, owned byroot:root
, with permissions0755
.If I copy this file into a fake filesystem the user and group are preserved, but the permissions are changed to
0444
.How To Reproduce
Note: This assumes you are on a *nix system with an executable file
/usr/bin/env
on your real filesystem.If not, substitute any other file owned by root with permissions
0755
.Your environment
Please run the following in the environment where the problem happened and
paste the output.
Beta Was this translation helpful? Give feedback.
All reactions