I have the following script:
$ ls -al setprog.sh -rwsrwxr-x 1 root root 52 Αυγ 2 10:23 setprog.sh $ cat setprog.sh #!/bin/bash while [ True ] do echo $(whoami) done
When running it
$ ./setprog.sh pkaramol pkaramol pkaramol
Why the process owner indicated by
ps (real user) and and the user by whom the program is executed (effective user?) match? Shouldn't the one of them be
root given that the script is owned by him?
$ ps aux | grep -i setpr pkaramol 10294 18.0 0.0 12888 3268 pts/0 S+ 10:45 0:00 /bin/bash ./setprog.sh pkaramol 16746 0.0 0.0 14432 1104 pts/1 S+ 10:45 0:00 grep --color=auto -i setpr