[GH-ISSUE #1947] Permission denied when run sed with the --in-place option #984

Closed
opened 2026-03-04 01:50:26 +03:00 by kerem · 0 comments
Owner

Originally created by @ggtakec on GitHub (May 22, 2022).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1947

Version of s3fs being used (s3fs --version)

Amazon Simple Storage Service File System V1.91 (commit:a30bede) with OpenSSL

Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)

2.9.2

Kernel information (uname -r)

5.10.96-90.460.amzn2.x86_64

s3fs command line used, if applicable

s3fs <bucket> /mnt/s3 -o allow_other,nonempty,enable_noobj_cache,enable_content_md5,use_cache=/tmp,url=https://s3.amazonaws.com,multireq_max=50,parallel_count=10,dbglevel=dbg,curldbg

Details about issue

Replacing a file in a mount with the --in-place option of the sed command results in Permission denied.

I prepare a 1002 byte file and execute the sed command as shown below, an error will occur.

$ stat testfile
    File: ‘testfile’
    Size: 1002            Blocks: 2          IO Block: 4096   regular file
  Device: 2bh/43d Inode: 25          Links: 1
  Access: (0644/-rw-r--r--)  Uid: ( 1001/nakatani)   Gid: (  100/   users)
  Access: 2022-05-22 09:04:00.000000000 +0000
  Modify: 2022-05-22 09:04:00.000000000 +0000
  Change: 2022-05-22 09:04:00.000000000 +0000
   Birth: -

$ sed -i -e 's/target_string/TARGET_STRING/g' testfile
  sed: couldn't close ./sedFgcMLn: Permission denied

This issue was discovered during the #1939 investigation. (It is still unknown if it is related to that Issue)

Originally created by @ggtakec on GitHub (May 22, 2022). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1947 #### Version of s3fs being used (s3fs --version) Amazon Simple Storage Service File System V1.91 (commit:a30bede) with OpenSSL #### Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse) 2.9.2 #### Kernel information (uname -r) 5.10.96-90.460.amzn2.x86_64 #### s3fs command line used, if applicable ``` s3fs <bucket> /mnt/s3 -o allow_other,nonempty,enable_noobj_cache,enable_content_md5,use_cache=/tmp,url=https://s3.amazonaws.com,multireq_max=50,parallel_count=10,dbglevel=dbg,curldbg ``` ### Details about issue Replacing a file in a mount with the `--in-place` option of the `sed` command results in `Permission denied`. I prepare a 1002 byte file and execute the `sed` command as shown below, an error will occur. ``` $ stat testfile File: ‘testfile’ Size: 1002 Blocks: 2 IO Block: 4096 regular file Device: 2bh/43d Inode: 25 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1001/nakatani) Gid: ( 100/ users) Access: 2022-05-22 09:04:00.000000000 +0000 Modify: 2022-05-22 09:04:00.000000000 +0000 Change: 2022-05-22 09:04:00.000000000 +0000 Birth: - $ sed -i -e 's/target_string/TARGET_STRING/g' testfile sed: couldn't close ./sedFgcMLn: Permission denied ``` This issue was discovered during the #1939 investigation. (It is still unknown if it is related to that Issue)
kerem closed this issue 2026-03-04 01:50:26 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#984
No description provided.