- 论坛徽章:
- 0
|
- fd=open("test.txt",O_CREAT|O_RDWR|O_TRUNC,S_IRWXU|S_IRGRP|S_IWGRP|S_IRWXO);
复制代码 这样创建的一个test.txt却是rwxrw-r-x这样的权限,不是应该是rwxrw-rwx吗????- nantian5:/home/train/priv/67/test02>ls
- filetest filetest.c
- nantian5:/home/train/priv/67/test02>./filetest
- open test.txt fd=3
- currops=0
- nantian5:/home/train/priv/67/test02>ls
- filetest filetest.c test.txt
- nantian5:/home/train/priv/67/test02>ls -l
- total 24
- -rwxrwxr-x 1 train train 5077 Jun 9 20:55 filetest
- -rw-rw-r-- 1 train train 469 Jun 9 20:55 filetest.c
- -rwxrw-r-x 1 train train 0 Jun 9 21:57 test.txt
- nantian5:/home/train/priv/67/test02>
复制代码 |
|