mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[PR #1954] [MERGED] Fixed a bug could not change the mode while the file was opened #2273
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#2273
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/1954
Author: @ggtakec
Created: 5/29/2022
Status: ✅ Merged
Merged: 6/12/2022
Merged by: @gaul
Base:
master← Head:fix_opened_chmod📝 Commits (1)
5e0640dFixed a bug could not change the mode while the file was opened📊 Changes
2 files changed (+37 additions, -0 deletions)
View changed files
📝
src/cache.cpp(+6 -0)📝
test/integration-test-main.sh(+31 -0)📄 Description
Relevant Issue (if applicable)
#1947
Details
When using the
--in-place(-c)option of the sed command, sed seems to behave as follows:0000)0644In s3fs, the stat information of a file is internally cached until flush is executed, during the file is opened.
In sed
--in-placemode, aPermission denied(EACCESS)error occurred because s3fs forgot to update the open file mode to the stat cache.So this PR fixed this bug.
NOTE
This PR added a test case.
Added test case was implemented with the sed command.
I made a shell script and a simple C test code and tried bug reproduction, but I couldn't reproduce the same error.
So the test is implemented with the sed command.
And in addition to the file mode, the file owner and group cache may also change, but I couldn't find a pattern that would cause an error while doing these things.
Therefore, this fix is limited to the file mode only.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
std::stringconstructors #2435