linux c 设置文件权限

#include<stdlib.h>
#include<stdio.h>
#include<sys/types.h>
#include<sys/stat.h>
int mode = 777;
int mode_u = mode / 100;
int mode_g = mode / 10 % 10;
int mode_o = mode % 10;
mode = mode_u * 8 * 8 + mode_g * 8 + mode_o; //八进制转换
chmod(mode, delidaemonfile);
# C++ 

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×