-
Notifications
You must be signed in to change notification settings - Fork 222
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
OS_chmod is requiring read access #650
Comments
I think this came up in a previous CCB at one point, when it was changed to use Linux offers a solution via the |
We discussed this a while ago when we talked about |
Regarding the actual test cases -- my suggestion is to still run through the test, but make the one where it tries to re-enable read access to be an "MIR" type if it fails. That is -- if it succeeds and returns OS_SUCCESS then the test passes no problem - but if it fails with non-OS_SUCCESS, then report it as MIR - so it will not stop the test. This way if the system does support |
If it is not able to be opened in read only can we then try to open it in write only? All that matters is that the file is open to prevent race potential. |
After a chance to think about this, seems preferable to the system-dependent |
Note that it is possible to have neither read nor write permission on a file, even for the file's owner (i.e. mode |
Understood (which is why I was hesitant at first w/ the suggestion), but it seems like the OSAL only supports setting it as the listed three? If OSAL doesn't support setting it as neither, does OS_chmod really need to support it conditionally based on if |
Fix #650, OS_chmod uses read or write access.
Describe the bug
If you don't have read access to a file then OS_chmod will not be able to change it. This is most likely caused by chmod opening the file as a way to avoid filename race potential, see the code snip.
To Reproduce
Expected behavior
You should be able to change the permissions of a file without read access.
Code snips
osal/src/os/portable/os-impl-posix-files.c
Lines 201 to 206 in 1a82657
System observed on:
Ubuntu 20.04
Reporter Info
Alex Campbell GSFC
The text was updated successfully, but these errors were encountered: