cooca中使用chmod()修改文件权限
2013-04-23 16:44
477 查看
int chmod(const char *, mode_t) /* File mode */ /* Read, write, execute/search by owner */ #define S_IRWXU 0000700 /* [XSI] RWX mask for owner */ #define S_IRUSR 0000400 /* [XSI] R for owner */ #define S_IWUSR 0000200 /* [XSI] W for owner */ #define S_IXUSR 0000100 /* [XSI] X for owner */ /* Read, write, execute/search by group */ #define S_IRWXG 0000070 /* [XSI] RWX mask for group */ #define S_IRGRP 0000040 /* [XSI] R for group */ #define S_IWGRP 0000020 /* [XSI] W for group */ #define S_IXGRP 0000010 /* [XSI] X for group */ /* Read, write, execute/search by others */ #define S_IRWXO 0000007 /* [XSI] RWX mask for other */ #define S_IROTH 0000004 /* [XSI] R for other */ #define S_IWOTH 0000002 /* [XSI] W for other */ #define S_IXOTH 0000001 /* [XSI] X for other */ #define S_ISUID 0004000 /* [XSI] set user id on execution */ #define S_ISGID 0002000 /* [XSI] set group id on execution */ #define S_ISVTX 0001000 /* [XSI] directory restrcted delete */ //修改一个文件的权限 chmod([[self filePath] UTF8String], S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
相关文章推荐
- 使用chmod修改文件权限
- 使用chmod修改文件权限
- 详细记录 mac 系统下使用 chmod 命令修改文件权限
- mac 系统下使用 chmod 命令修改文件权限
- [Linux文件属性]使用chmod函数修改指定文件权限
- linux修改文件读写执行权限命令chmod
- android中通过代码实现文件权限修改(chmod)
- 修改linux文件权限命令:chmod
- chmod 修改文件权限
- ubuntu 下修改文件访问权限chmod 777 -R *血的教训!没事别乱开权限!用谁开谁的就行。。。最后不要用这个命令,文件操作全部改用终端
- chmod 修改同一目录下文件或文件夹的不同权限
- 修改linux文件权限命令:chmod
- linux中的文件权限和chmod命令的使用
- 【chmod】修改文件权限
- chmod、chown修改文件权限属主属组
- linux修改文件权限命令(chmod)
- linux修改文件访问权限 : chmod :chown 应用实例
- linux文件权限查看及修改-chmod ------入门的一些常识 .
- chmod 使用数字设置linux文件权限
- chmod,chgrp,chown命令 修改文件权限