Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在ubuntu中打开文件时询问系统密码的C语句_C_Linux_File_Permissions - Fatal编程技术网

在ubuntu中打开文件时询问系统密码的C语句

在ubuntu中打开文件时询问系统密码的C语句,c,linux,file,permissions,C,Linux,File,Permissions,如果我有一个客户端描述符,如下所示: int fileDescriptor = open("myfile.txt", O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR); 我如何编辑此语句,以便如果我想打开它(双击),系统会要求我输入系统密码?在什么位置打开它?双击桌面上的图标,例如gedit或CATT。这需要大量工作!在什么地方打开它?双击我桌面上的图标,例如gedit或CATT。这是一个很大的工作!

如果我有一个客户端描述符,如下所示:

int fileDescriptor = open("myfile.txt", O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);

我如何编辑此语句,以便如果我想打开它(双击),系统会要求我输入系统密码?

在什么位置打开它?双击桌面上的图标,例如gedit或CATT。这需要大量工作!在什么地方打开它?双击我桌面上的图标,例如gedit或CATT。这是一个很大的工作!