您的位置:首页 > 运维架构 > Linux

Linux文件属主显示数字

2015-09-10 12:23 555 查看
今天发现一个很有趣的东西,Linux系统中有一个文件的属主是数字

[root@rac1 ~]# ls -al test

-rw-r--r-- 1 111 root 0 Sep 10 04:13 test

很好奇,想了想,可能是改变属组的时候使用的uid,但是后来uid改变了,然后就尝试一下:

[root@rac1 ~]# touch test

[root@rac1 ~]# useradd -u 112 -g root test

[root@rac1 ~]# chown 112:root test

[root@rac1 ~]# ls -al test

-rw-r--r-- 1 lm root 0 Sep 10 04:18 test

[root@rac1 ~]# usermod -u 113 -g root test

[root@rac1 ~]# ls -al test

-rw-r--r-- 1 112 root 0 Sep 10 04:18 test

现在,数字的属主就出现了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: