[
https://issues.apache.org/jira/browse/HDFS-16360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454077#comment-17454077
]
Yayu Wang commented on HDFS-16360:
----------------------------------
I reproduced this deletion in a docker container. Just don't set the property
_fs.default.name_ in core-site.xml, and the hdfs dfs command is working on
local file system by default even if there is no running namenode or datanode
or something. The *rm -r /* command would delete every thing if the user have
enough permision.
I am not sure whether it is expected behavior but I don't think it is a safe
operation. Users may not be aware that they are performing commands in their
local file systems.
> Adding confirm prompt when removing root directory on local filesystem
> ----------------------------------------------------------------------
>
> Key: HDFS-16360
> URL: https://issues.apache.org/jira/browse/HDFS-16360
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Yayu Wang
> Priority: Major
>
> Would you like to add a confirm prompt when removing the root directory,
> especially when using local filesystem? I forgot to set fs.defaultFS and
> executed `rm -r /*` and it deleted everything on my local system. I lost
> everything under my $HOME directory, and I think a sudo user may destroy the
> host by doing so.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]