You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running a recursive removal on a directory works, but also throws an error "Cannot remove <DIR>: No such file or directory where <DIR> is the path specified for removal:
ex: rm -R /This_is/My_path
output: cannot remove My_path: No such file or directory.
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
Most likely, this is expected behaviour, as Mountpoint removes implicit directories (for more context, see SEMANTICS.MD): Once the last file in the directory is deleted (i.e. if a directory blue is visible because of keys that are mapped to files blue/a.txt and blue/b.txt, the directory will cease to exist once the two objects are deleted from S3 or the two files are removed).
Thus, when rm tries to delete the directory, it will already be considered to not exist by Mountpoint, as all files in the directory will have been deleted before.
There already is an issue about changing this behaviour and we are considering revisiting our current semantics decision, but we don't have anything concrete to share on that yet.
As a workaround, at least in my testing, the issue didn't occur when i used rm -Rf DIR on the directory, alternatively, only removing the files in the directory, i.e. using something along the lines of find DIR -type f -delete should also work without throwing an error.
Please let us know, if that doesn't work in your use-case.
Mountpoint for Amazon S3 version
mount-s3 1.13.0
AWS Region
us-east-1
Describe the running environment
EC2 instance running Ubuntu 22.04
Mountpoint started with service that sets the needed AWS credentials to the S3 bucket
Mountpoint options
What happened?
Running a recursive removal on a directory works, but also throws an error "Cannot remove <DIR>: No such file or directory where <DIR> is the path specified for removal:
ex: rm -R /This_is/My_path
output: cannot remove My_path: No such file or directory.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: