使用预设用户和组

时间:2016-11-23 19:26:31

标签: bash install centos7

尝试使用预设用户和用户组创建文件

之后缺少目标文件操作数
install -m 644 -o root -g root /var/test/file

收到错误:

install: missing destination file operand after ‘/var/test/file’
Try 'install --help' for more information.

注意:对于目录创建,使用-d但不适用于文件...

1 个答案:

答案 0 :(得分:1)

与文件一起使用时,

install需要目标操作数。如果要在当前目录中安装/var/test/file,请使用:

install -m 644 -o root -g root /var/test/file .