1,将root目录下的所有文件与子目录的拥有者皆设为 root,群体的使用者 grace:
chown -R root:grace /root
2,将elasticsearch目录下的所有文件与子目录的拥有者和群体的使用者 均设为grace:
chown -R grace:grace /root/apps/elasticsearch-6.3.1
3,将home目录下的所有文件与子目录的拥有者和群体的使用者 均设为grace:
chown -R grace:grace /home
4,切换用户,即可
[root@hdp-4 ~]# su grace
[grace@hdp-4 root]$