Quote:
Again, all of the processes inherit permissions/rights/ownership from the parent process (where they were started from). Only root has right to modify it. The location of the binary is completely irrelevant. The access to any file/dir depends on the current user and group (of the process, which wanted to access it), and the access rights of the given path. |
Simple Example:
A stand alone executable. This will run as the user who ran the executable. Doesn't matter what directory it it in. cpuload.c Code:
//gcc cpuload.c -o cpuload Code:
ps a -o pid,tty,etime,cmd,user |
All times are GMT -5. The time now is 03:15 AM. |