无法以 root 用户身份在 /var/log 下创建目录

无法以 root 用户身份在 /var/log 下创建目录

出现以下错误可能是什么原因。我以 root 用户身份运行该脚本。我相信root用户必须具有超级用户权限。它因以下错误而失败

mkdir:无法创建目录“/var/log/hadoop”:权限被拒绝

(base) [root@localhost ~]# cat /tmp/hadoop-service-startup.log
STARTING NAMENODE
WARNING: HADOOP_NAMENODE_OPTS has been replaced by HDFS_NAMENODE_OPTS. Using value of HADOOP_NAMENODE_OPTS.
WARNING: /var/log/hadoop does not exist. Creating.
mkdir: cannot create directory ‘/var/log/hadoop’: Permission denied
ERROR: Unable to create /var/log/hadoop. Aborting.
COMPLETE
STARTING SECONDARY NAMENODE
WARNING: HADOOP_SECONDARYNAMENODE_OPTS has been replaced by HDFS_SECONDARYNAMENODE_OPTS. Using value of HADOOP_SECONDARYNAMENODE_OPTS.
WARNING: /var/log/hadoop does not exist. Creating.
mkdir: cannot create directory ‘/var/log/hadoop’: Permission denied
ERROR: Unable to create /var/log/hadoop. Aborting.
COMPLETE
STARTING DATANODE
WARNING: HADOOP_DATANODE_OPTS has been replaced by HDFS_DATANODE_OPTS. Using value of HADOOP_DATANODE_OPTS.
WARNING: /var/log/hadoop does not exist. Creating.
mkdir: cannot create directory ‘/var/log/hadoop’: Permission denied
ERROR: Unable to create /var/log/hadoop. Aborting.
COMPLETE
STARTED DAEMONS
4884 Jps
STARTING RESOURCEMANGER
WARNING: /var/log/hadoop does not exist. Creating.
mkdir: cannot create directory ‘/var/log/hadoop’: Permission denied
ERROR: Unable to create /var/log/hadoop. Aborting.
COMPLETE
STARTING NODEMANGER
WARNING: /var/log/hadoop does not exist. Creating.
mkdir: cannot create directory ‘/var/log/hadoop’: Permission denied
ERROR: Unable to create /var/log/hadoop. Aborting.
COMPLETE
STARTING HISTORYSERVER
WARNING: /var/log/hadoop does not exist. Creating.
mkdir: cannot create directory ‘/var/log/hadoop’: Permission denied
ERROR: Unable to create /var/log/hadoop. Aborting.
COMPLETE
STARTED DAEMONS
5012 Jps

相关内容