shell - 第二个 www-data 是什么意思?

标签 shell

我对chown知之甚少。

chown rob:developers strace.log

将 strace.log 的所有者更改为“rob”,将组标识符更改为“developers”。

命令怎么样:

chown  www-data.www-data /var/www/html/

1.是 www-data.www-data ,不是 www-data:www-data ,这里的.是什么意思?
2.我知道第一个www-data是组名,那第二个www-data是什么意思呢?

在我的系统中:debian7.

cat   /etc/group
www-data:x:33:

cat  /etc/passwd
www-data:x:33:33:www-data:/var/www:/bin/sh

命令 chown -Rf www-data.www-data/var/www/html/ 在我的 debian 中运行良好。

最佳答案

它具有相似的含义,只是点 (.) 是根据 this 分隔所有者和组的旧方法。

Previous versions of the chown utility used the dot (``.'') character to distinguish the group name.

This has been changed to be a colon (``:'') character, so that user and group names may contain the dot character.

关于shell - 第二个 www-data 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27732032/

相关文章:

linux - 查找系统中包含目录的最大文件数

linux - 用于查找文件大小的 Bash shell 脚本

java - 在java中运行脚本的有效方法

linux - getopts 空参数和默认值

linux - 将 Windows bat 文件转换为 Linux sh shell 脚本

linux - 在 cd 后执行 ls 的脚本

git - EC2 上的启动脚本

bash - 为什么我不应该在 shell 脚本上使用 "bet the future of the company"?

shell - Ansible 命令模块显示 '|' 是非法字符

linux - 如何在 shell 脚本中获取运行、休眠、停止和僵尸进程的数量