mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #2118] Change ownership of a file #1079
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#1079
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?
Originally created by @ValentinNikin on GitHub (Feb 20, 2023).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2118
Additional Information
Version of s3fs being used (
s3fs --version)V1.89
Version of fuse being used (
pkg-config --modversion fuse,rpm -qi fuseordpkg -s fuse)fuse3 3.10.3-2
Kernel information (
uname -r)5.10.0-21-cloud-amd64
GNU/Linux Distribution, if applicable (
cat /etc/os-release)Debian GNU/Linux 11 (bullseye)
Details about issue
I have bucket with 2 folders (SOURCE and FAILED). Bucket is available through the IAM role.

I also have 2 EC2 instances.
On the first instance I login with the "userserver" user and mounted 2 folders.
In the SOURCE folder I have 1 file. The file is owned by "userserver".
On the second instance I login with the "admin" user and mounted 1 folders.
In the SOURCE folder I have 1 file. The file is owned by "admin".
Next on the first EC2 instance I moved the file to the FAILED folder and return it back.
The owner of the file on this instance has not changed.
But on the second EC2 instance, the owner of the file has changed (now is "user").
And I have lost read access to this file with "admin" user rights.
"userserver" and "user" users have equals ids (1002). I think that's why the current owner of the file is "user".
Is it correct behaviour? Is there a way to keep the rights for file on the second EC2 instance for the "admin" user?
@ggtakec commented on GitHub (Mar 12, 2023):
Maybe those files weren't created using s3fs.
Objects(files, directories) created from S3 clients other than s3fs, such as the AWS console, aws cli, do not have attributes in Linux.
Files and objects without attributes are displayed and operated as attributes of the user who started s3fs.
I think your phenomenon is this effect.
When performing exactly the same operation (attribute operation) as for local files such as Linux, the files and objects to be operated must have attributes in advance.
For example, you can give attributes to a file with the
touchcommand before operating on it.