I just learned about file security, user & group, etc.
And I appreciate a lot about the elegance of the filesystem of linux.
My username is lyg
, and I found there are some files with owner lyg
in /proc/
, as shown below:
lyg@lyg-VirtualBox:~$ ll /proc/|grep lyg
dr-xr-xr-x 8 root lyg 0 Aug 7 09:11 1119/
dr-xr-xr-x 8 lyg lyg 0 Aug 7 09:47 1298/
dr-xr-xr-x 8 lyg lyg 0 Aug 7 22:05 7097/
dr-xr-xr-x 8 lyg lyg 0 Aug 7 22:05 7098/
Then I found that this could not happen normally, these files cannot be created by me manually, since I had no permissions requiered, see:
lyg@lyg-VirtualBox:~$ ls -ld /proc/
dr-xr-xr-x 108 root root 0 Aug 7 09:10 /proc/
and here was my processes information, from which I knew that /proc/1298/
was related to -bash
process:
lyg@lyg-VirtualBox:~$ ps -ef|grep lyg
avahi 452 1 0 09:11 ? 00:00:00 avahi-daemon: running [lyg-VirtualBox.local]
lyg 1298 1119 0 09:11 tty1 00:00:22 -bash
lyg 7099 1298 0 22:05 tty1 00:00:00 ps -ef
lyg 7100 1298 0 22:05 tty1 00:00:00 grep --color=auto lyg
So, how are these files in /proc/
created?