[GH-ISSUE #187] s3fs rm -rf do not removes dir #105

Closed
opened 2026-03-04 01:42:09 +03:00 by kerem · 3 comments
Owner

Originally created by @vohaul on GitHub (May 12, 2015).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/187

Ubuntu 14.04
after s3fs rm -rf source under my own user (sudoer) directory becomes like d--------- 1 root root 0 Jan 1 1970 source
Should it work this way?

Originally created by @vohaul on GitHub (May 12, 2015). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/187 Ubuntu 14.04 after `s3fs rm -rf source` under my own user (sudoer) directory becomes like `d--------- 1 root root 0 Jan 1 1970 source` Should it work this way?
kerem closed this issue 2026-03-04 01:42:10 +03:00
Author
Owner

@sqlbot commented on GitHub (May 13, 2015):

How was this directory originally created? With s3fs? Or perhaps a folder object in the AWS console? Does anything show in the AWS console, such as an empty folder or empty document? If a document, does it have any metadata?

<!-- gh-comment-id:101481852 --> @sqlbot commented on GitHub (May 13, 2015): How was this directory originally created? With s3fs? Or perhaps a folder object in the AWS console? Does anything show in the AWS console, such as an empty folder or empty document? If a document, does it have any metadata?
Author
Owner

@vohaul commented on GitHub (May 13, 2015):

It was a folder (not document) created via rails worker with FileUtils::mkdir_p @upload_html. Before was a system call `system "mkdir -p #{@upload_html}"`` with the same result. Amazon console shows not empty folder full of unremoved content.

<!-- gh-comment-id:101537711 --> @vohaul commented on GitHub (May 13, 2015): It was a folder (not document) created via rails worker with `FileUtils::mkdir_p @upload_html`. Before was a system call `system "mkdir -p #{@upload_html}"`` with the same result. Amazon console shows not empty folder full of unremoved content.
Author
Owner

@ggtakec commented on GitHub (Jan 17, 2016):

If the directory does not have any permission(d---------), the directory object on S3 is not existed or does not have any z-amz-meta-* HTTP header.
The reason is the object is uploaded by other S3 tools(ex, s3cmd/s3 console/etc).
So the directory which has no permission can not be removed by any user except root.
If you need to remove those directories, you should add permission for directories or remove those by root user.
(Please see FAQ)

I'm closing this issue, if you have any problem about this issue, please reopen this.

Regards,

<!-- gh-comment-id:172306979 --> @ggtakec commented on GitHub (Jan 17, 2016): If the directory does not have any permission(d---------), the directory object on S3 is not existed or does not have any z-amz-meta-\* HTTP header. The reason is the object is uploaded by other S3 tools(ex, s3cmd/s3 console/etc). So the directory which has no permission can not be removed by any user except root. If you need to remove those directories, you should add permission for directories or remove those by root user. (Please see FAQ) I'm closing this issue, if you have any problem about this issue, please reopen this. Regards,
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#105
No description provided.