guojiu

导航

2014年10月15日 #

chmod和fchmod函数 /chown ,fchown,lchown函数

摘要: 这两个函数使我们可以更改现有文件的访问权限:#include int chmod( const char *pathname, mode_t mode );int fchmod( int filedes, mode_t mode );两个函数返回值:若成功则返回0,若出错则返回-1chmod函数在指... 阅读全文

posted @ 2014-10-15 17:34 guojiu 阅读(632) 评论(0) 推荐(0) 编辑

umask函数

摘要: umask函数为进程设置文件模式创建屏蔽字,并返回以前的值。#include mode_t umask( mode_t cmask); 返回值:以前的文件模式创建屏蔽字参数cmask是由S_IRUSR、S_IWUSR、S_IXUSR、S_IRGRP、S_IW... 阅读全文

posted @ 2014-10-15 16:37 guojiu 阅读(670) 评论(0) 推荐(0) 编辑

文件和目录:access函数

摘要: access函数是按照实际用户ID和实际组ID进行访问权限测试的:#include int access( const char *pathname, int mode ); 返回值:若成功则返回0,若出错则返回-1mo... 阅读全文

posted @ 2014-10-15 16:09 guojiu 阅读(390) 评论(0) 推荐(0) 编辑