Skip to content
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

Move file to mounted folder, Operation not permitted #715

Closed
angelorobo opened this issue Aug 23, 2022 · 2 comments
Closed

Move file to mounted folder, Operation not permitted #715

angelorobo opened this issue Aug 23, 2022 · 2 comments

Comments

@angelorobo
Copy link

angelorobo commented Aug 23, 2022

When I tried to move a file to the goofys mounted folder, I got an error Operation not permitted. Do I miss anything?

$ cp ~/Downloads/googlechrome.dmg /Users/Shared/st-munki-repo/pkgs/apps/googlechrome__1.dmg
cp: ~/Downloads/googlechrome.dmg: could not copy extended attributes to /Users/Shared/st-munki-repo/pkgs/apps/googlechrome__1.dmg: Operation not permitted

Here is my goofys command:

$ goofys -f --debug_fuse --debug_s3 --file-mode 0644 --dir-mode 0755 st-munki-repo /Users/Shared/st-munki-repo
-----------------------------------------------------
2022/08/22 17:06:03.482157 s3.DEBUG DEBUG: Response s3/HeadObject Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 404 Not Found
Connection: close
Content-Type: application/xml
Date: Tue, 23 Aug 2022 00:06:03 GMT
Server: AmazonS3
X-Amz-Id-2: xxxxxxxx
X-Amz-Request-Id: 1FNQSF78F8H2HYHP


-----------------------------------------------------
2022/08/22 17:06:03.482235 s3.DEBUG DEBUG: Validate Response s3/HeadObject failed, attempt 0/3, error NotFound: Not Found
	status code: 404, request id: 1FNQSF78F8H2HYHP, host id: uYzmUMhl7DJiNNf7hnFDPq3glwsAQYIbe+GTpEijaTBCLoytlpnx4Pif978VULe+xnPphkeValQ=
2022/08/22 17:06:03.482786 s3.DEBUG DEBUG: Request s3/ListMultipartUploads Details:
---[ REQUEST POST-SIGN ]-----------------------------
GET /st-munki-repo?uploads= HTTP/1.1
Host: s3.us-west-2.amazonaws.com
User-Agent: aws-sdk-go/1.38.7 (go1.19; darwin; amd64)
Accept-Encoding: identity
Authorization: AWS4-HMAC-SHA256 Credential=xxxxx/20220823/us-west-2/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=xxxxx
X-Amz-Date: 20220823T000603Z


-----------------------------------------------------
mount_macfuse: mount point /Users/Shared/st-munki-repo is itself on a macFUSE volume
2022/08/22 17:06:03.528542 s3.DEBUG DEBUG: Response s3/ListMultipartUploads Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/xml
Date: Tue, 23 Aug 2022 00:06:04 GMT
Server: AmazonS3
X-Amz-Id-2: xxxxxx
X-Amz-Request-Id: 1FNXQY22MJKYH6M8
@monthonk
Copy link
Contributor

monthonk commented Aug 25, 2022

Hi Angelo, there seem to be some errors on set extended attribute operation on MacOS. I will give you an update once I have found the root cause.

In the meantime, you can see the list of extended attributes on your files with xattr $filename, and if it's fine for you to remove them, use command xattr -c $filename then try to move your files to goofys mounted folder again.

@monthonk
Copy link
Contributor

monthonk commented Aug 25, 2022

after looking into the code, it appears that goofys allows us to set extended attributes with prefixes s3 (or other specific cloud names) and user only.

As you can see from xattr, files in mac usually have extended attribute keys starting with com.apple, which is the reason you cannot copy those files to goofys folder. Also, the way cp works in mac is different than other OS because it includes these extended attributes as default behavior. The best way you can do for now is excluding them by using cp -X option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants