-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behavior for directories with 0o000
permissions does not match native filesystems
#719
Labels
Comments
jessecureton-aurora
changed the title
Behavior for directories with 0o000 permissions does not match native filesystems
Behavior for directories with Sep 23, 2022
0o000
permissions does not match native filesystems
Thanks for the report and the detailed description! I will have a look at the problem. |
mrbean-bremen
added a commit
to mrbean-bremen/pyfakefs
that referenced
this issue
Oct 3, 2022
- rmdir and chmod work without permission if the file user ID is the current user ID - better handle owner/group/other permission bits - fixes pytest-dev#719
@jessecureton-aurora - should be fixed in master now, please check if it works for you. |
github-actions bot
pushed a commit
that referenced
this issue
Oct 4, 2022
…ssion if the file user ID is the current user ID - better handle owner/group/other permission bits - fixes #719
@mrbean-bremen Thanks for getting this fixed!! Yes, I just confirmed that this passes my test cases locally - all seems well |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The behavior of file operations on directories with
0o000
permissions does not match the behavior of native filesystems for at least rmdir and chmod operations. The owner of a file/dir with0o000
perms should always be able to remove or chmod them again, but pyfakefs does not respect this.I've attached both a pytest test suite and bash script that demonstrates these operations and confirmed the behavior is the same on Ubuntu 18.04 and MacOS 12.5.1.
How To Reproduce
Here's a set of Pytest cases that show the operations passing natively and failing when run in pyfakefs. You can also directly run the python test file without using pytest to get an annotated output of the test.
Python test case
Full python test output
Notice that the `test_do_mkdir_native` test case passes, but the `test_do_mkdir_fakefs` test case fails.As a bonus, here's a Bash script that runs the same test to confirm that this does behave as expected. I've confirmed this on both MacOS and Linux.
Bash test case
Your environment
On MacOS:
On Ubuntu:
The text was updated successfully, but these errors were encountered: