You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Suppose I have a real file /usr/bin/env, owned by root:root, with permissions 0755.
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.
Ok, I completly forgot that this is expected behavior. By default, files from the real filesystem are mapped as read-only. From the documentation:
The access to the files is by default read-only, but even if you add them using read_only=False, the files are written only in the fake system (e.g. in memory).
Replacing fs.add_real_file(file) with fs.add_real_file(file, read_only=False) should give you the wanted behavior.
Please check if this is sufficient for you.
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.
The text was updated successfully, but these errors were encountered: