使用chown -hR
h表示修改symbolic链接而不去修改对应的文件。
R表示在所有子目录及目录中的文件中递归执行。
具体参数说明:
-h, --no-dereference affect each symbolic link instead of any referenced
file (useful only on systems that can change the
ownership of a symlink)
-R, --recursive operate on files and directories recursively
sudo chown -hR root:root rootfs
上面这个命令付给rootfs文件夹的所有者是rootfs,还把这个文件夹赋予组rootfs所有权限