-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
sudo trash
still has no permission
#28
Comments
This behavior is intentional, although, should be better documented. See: https://github.com/sindresorhus/macos-trash/blob/6f8bf84ff488d3fd64559e632281af184e023191/Sources/trash/main.swift#L6-L7 And the issue that triggered it: sindresorhus/macos-trash#2 If running as Maybe we could downgrade the permissions of the directory while being |
Not sure if this has to be done recursively. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thanks for following up. I didn't make this clear in my original comment (apologies), but my suggestion to move files directly to the trash would fix this If this issue didn't exist, I'd agree with you on using the API. But being unable to trash files with
This would result in the file(s) in the trash having downgraded (loosened) permissions, which would be bad from a security perspective, and inconsistent with what Finder does when trashing such files. Realistically, the location of the Trash folder is going to be extremely stable, and in the rare event that it does change, there'd be plenty of notice to deal with it. So to me, it's worth the tradeoff to fix this otherwise intractable issue. |
Also see: sindresorhus/macos-trash#11 |
I'm on macOS 10.15.2
Create
❯ sudo mkdir /Users/wow ❯ sudo mkdir /Users/wow mkdir: /Users/wow: File exists # ✅
Delete with trash
Delete with rm
The text was updated successfully, but these errors were encountered: