Check the parent process id of the script... owner of the parent process should be the user who executed the file.
试着用猪来设置权限的文件用以执行。这也许会让你的用户在执行过程中,如果你幸运的话,你就可以把自己的身份很容易。
Notice that the parent process id (PPID) in the first output of ps is 8619, which is the process id (PID) of the script.
注意:ps的第一个输出中的父进程id (PPID)为8619,这是脚本的进程id (PID)。
Although a parent process can access the process ID of its child process and can thus pass arguments to it, the reverse is false.
尽管父进程可以访问其子进程的进程ID并向它传递参数,但是反过来不行。
The first lists the user the process is running as, the second lists the ID of the process, and the third lists the ID of the parent of the process.
第一列列出用于运行该进程的用户身份,第二列列出进程的ID,第三列列出该进程的父进程id。
The child gets 0, the parent gets the process ID of the child, and the value of the variable determines which of the if/then/else branches to take.
子进程获得0,父进程获得子进程的进程ID,这个变量的值决定执行哪个if/then/else分支。
The child gets 0, the parent gets the process ID of the child, and the value of the variable determines which of the if/then/else branches to take.
子进程获得0,父进程获得子进程的进程ID,这个变量的值决定执行哪个if/then/else分支。
应用推荐