[GH-ISSUE #661] Copy file or directory to s3fs report error "cp: preserving permissions for `s3fs/xxxx': No such file or directory" #377

Open
opened 2026-03-04 01:44:57 +03:00 by kerem · 1 comment
Owner

Originally created by @CaesarTang on GitHub (Oct 18, 2017).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/661

Additional Information

The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all.

  • Version of s3fs being used (s3fs --version)

  • example: 1.82

  • Version of fuse being used (pkg-config --modversion fuse)

  • example: 2.9.5

  • System information (uname -a)

  • _command result: centos 6.5

  • Distro (cat /etc/issue)

  • _command result: CentOS release 6.5 (Final) Kernel \r on an \m

  • s3fs command line used (if applicable)
    ./s3fs -o uid=500,gid=500,default_acl="",allow_other,use_path_request_style,sigv2,url=http://xxxx.com/ my_bucket /mnt/s3fs

When I copy some directories to mounted s3fs ,
the "cp" command report "**cp: preserving permissions for `s3fs/xxxx': No such file or directory**" infomation after copy end, 
but all files have being copied , and read/write normally, 
but some files permission is abnormal:"----------", 
so why would this problem cause? Please help! Thanks!
Originally created by @CaesarTang on GitHub (Oct 18, 2017). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/661 #### Additional Information _The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all._ - Version of s3fs being used (s3fs --version) - _example: 1.82_ - Version of fuse being used (pkg-config --modversion fuse) - _example: 2.9.5_ - System information (uname -a) - _command result: centos 6.5 - Distro (cat /etc/issue) - _command result: CentOS release 6.5 (Final) Kernel \r on an \m - s3fs command line used (if applicable) ./s3fs -o uid=500,gid=500,default_acl="",allow_other,use_path_request_style,sigv2,url=http://xxxx.com/ my_bucket /mnt/s3fs ``` When I copy some directories to mounted s3fs , the "cp" command report "**cp: preserving permissions for `s3fs/xxxx': No such file or directory**" infomation after copy end, but all files have being copied , and read/write normally, but some files permission is abnormal:"----------", so why would this problem cause? Please help! Thanks!
Author
Owner

@ggtakec commented on GitHub (Nov 5, 2017):

@CaesarTang
s3fs treats the S3 object virtually as files and directories.
Then if the S3 object does not have file permission information(x-amz-* HEADERs), it recognizes permission as 000 and operates.
For example, the S3 object uploaded using s3cmd or S3 console will be handled like this.
Even uploading via s3fs, changing file permissions. it will give these attributes to the S3 object.
However, for files that have never been manipulated, there are cases where it is better to pass default values.

In order to solve your problem, I think it is good to use the umask, mp_umask option.
Please try to use these options.

Thanks in advance for your assistance.

<!-- gh-comment-id:341955932 --> @ggtakec commented on GitHub (Nov 5, 2017): @CaesarTang s3fs treats the S3 object virtually as files and directories. Then if the S3 object does not have file permission information(x-amz-* HEADERs), it recognizes permission as 000 and operates. For example, the S3 object uploaded using s3cmd or S3 console will be handled like this. Even uploading via s3fs, changing file permissions. it will give these attributes to the S3 object. However, for files that have never been manipulated, there are cases where it is better to pass default values. In order to solve your problem, I think it is good to use the umask, mp_umask option. Please try to use these options. Thanks in advance for your assistance.
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#377
No description provided.