Is there a way to identify the user who owns a process from /proc/PIDHow to get PID of background process?Alternative to /proc/PID/exe symlink for retrieving another processes full path via PIDHow do I find the owning PID of a socket using only /proc/proc/[pid]/pagemaps and /proc/[pid]/maps | linuxCalculating memory of a Process using Proc file systemWhat is a .pid file and what does it contain?How to decode /proc/pid/pagemap entries in Linux?Does /proc/[pid]/net/tcp refers to only to sockets owned by [pid]?Linux: Reading the output of readlink /proc/pid/exe within a Bash ScriptWhy is CapEff all zeros in /proc/$PID/status

How to deal with a Murder Hobo Paladin?

What is the shape of the upper boundary of water hitting a screen?

Why did Super-VGA offer the 5:4 1280*1024 resolution?

SOQL Query (or other means) to get the icon assigned to an object

Motorcyle Chain needs to be cleaned every time you lube it?

How predictable is $RANDOM really?

Can a USB hub be used to access a drive from two devices?

Is there an upper limit on the number of cards a character can declare to draw from the Deck of Many Things?

How did Einstein know the speed of light was constant?

What's the difference between a type and a kind?

Minor differences between two recorded guitars

Taking my Ph.D. advisor out for dinner after graduation

Options for quick email reply to the effect of "I've just done it" or "I've taken care of it"

Why is there paternal, for fatherly, fraternal, for brotherly, but no similar word for sons?

Initializing variables in an "if" statement

What is the fundamental difference between catching whales and hunting other animals?

Why does mean tend be more stable in different samples than median?

As a supervisor, what feedback would you expect from a PhD who quits?

Why was no first prize awarded at a competition?

How to get the speed of my spaceship?

Multi-user CRUD: Valid, Problem, or Error?

What is the meaning of "prairie-dog" in this sentence?

Passwordless authentication - how invalidate login code

Does the sensor of a dslr count the number of photons that hits it?



Is there a way to identify the user who owns a process from /proc/PID


How to get PID of background process?Alternative to /proc/PID/exe symlink for retrieving another processes full path via PIDHow do I find the owning PID of a socket using only /proc/proc/[pid]/pagemaps and /proc/[pid]/maps | linuxCalculating memory of a Process using Proc file systemWhat is a .pid file and what does it contain?How to decode /proc/pid/pagemap entries in Linux?Does /proc/[pid]/net/tcp refers to only to sockets owned by [pid]?Linux: Reading the output of readlink /proc/pid/exe within a Bash ScriptWhy is CapEff all zeros in /proc/$PID/status






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am parsing process details out of /proc/PID and I am so far unable to find who owns a process from that meta directory's files.



Documentation does not seem to point to that info as well:










share|improve this question






























    1















    I am parsing process details out of /proc/PID and I am so far unable to find who owns a process from that meta directory's files.



    Documentation does not seem to point to that info as well:










    share|improve this question


























      1












      1








      1








      I am parsing process details out of /proc/PID and I am so far unable to find who owns a process from that meta directory's files.



      Documentation does not seem to point to that info as well:










      share|improve this question
















      I am parsing process details out of /proc/PID and I am so far unable to find who owns a process from that meta directory's files.



      Documentation does not seem to point to that info as well:







      linux






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 14 '16 at 6:00









      Dmitri Chubarov

      11.6k3 gold badges26 silver badges56 bronze badges




      11.6k3 gold badges26 silver badges56 bronze badges










      asked Jul 14 '16 at 5:47









      gextragextra

      4,1646 gold badges28 silver badges50 bronze badges




      4,1646 gold badges28 silver badges50 bronze badges






















          2 Answers
          2






          active

          oldest

          votes


















          2














          The owner of the process is the owner of all files in the /proc/PID directory.



          $ ls -l /proc/27595
          total 0
          dr-xr-xr-x 2 me users 0 Jul 14 11:53 attr
          -r-------- 1 me users 0 Jul 14 11:53 auxv
          ...


          Also the file /proc/PID/loginuid holds the UID of the owner of the process.



          $ cat /proc/27595/loginuid
          1000





          share|improve this answer
































            0














            The owner of the files in /proc/[pid]/ is not always the user -- programs can e.g. make themselves "non-dumpable" to avoid leaking sensitive information if they become another user, and then the file ownership of the files in the directory can change to root.



            But normally the UID of the process can be retrieved by an fstat call (or a stat command ) on the /proc/[pid] directory itself.






            share|improve this answer

























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f38366362%2fis-there-a-way-to-identify-the-user-who-owns-a-process-from-proc-pid%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              The owner of the process is the owner of all files in the /proc/PID directory.



              $ ls -l /proc/27595
              total 0
              dr-xr-xr-x 2 me users 0 Jul 14 11:53 attr
              -r-------- 1 me users 0 Jul 14 11:53 auxv
              ...


              Also the file /proc/PID/loginuid holds the UID of the owner of the process.



              $ cat /proc/27595/loginuid
              1000





              share|improve this answer





























                2














                The owner of the process is the owner of all files in the /proc/PID directory.



                $ ls -l /proc/27595
                total 0
                dr-xr-xr-x 2 me users 0 Jul 14 11:53 attr
                -r-------- 1 me users 0 Jul 14 11:53 auxv
                ...


                Also the file /proc/PID/loginuid holds the UID of the owner of the process.



                $ cat /proc/27595/loginuid
                1000





                share|improve this answer



























                  2












                  2








                  2







                  The owner of the process is the owner of all files in the /proc/PID directory.



                  $ ls -l /proc/27595
                  total 0
                  dr-xr-xr-x 2 me users 0 Jul 14 11:53 attr
                  -r-------- 1 me users 0 Jul 14 11:53 auxv
                  ...


                  Also the file /proc/PID/loginuid holds the UID of the owner of the process.



                  $ cat /proc/27595/loginuid
                  1000





                  share|improve this answer















                  The owner of the process is the owner of all files in the /proc/PID directory.



                  $ ls -l /proc/27595
                  total 0
                  dr-xr-xr-x 2 me users 0 Jul 14 11:53 attr
                  -r-------- 1 me users 0 Jul 14 11:53 auxv
                  ...


                  Also the file /proc/PID/loginuid holds the UID of the owner of the process.



                  $ cat /proc/27595/loginuid
                  1000






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jul 14 '16 at 6:00

























                  answered Jul 14 '16 at 5:55









                  Dmitri ChubarovDmitri Chubarov

                  11.6k3 gold badges26 silver badges56 bronze badges




                  11.6k3 gold badges26 silver badges56 bronze badges























                      0














                      The owner of the files in /proc/[pid]/ is not always the user -- programs can e.g. make themselves "non-dumpable" to avoid leaking sensitive information if they become another user, and then the file ownership of the files in the directory can change to root.



                      But normally the UID of the process can be retrieved by an fstat call (or a stat command ) on the /proc/[pid] directory itself.






                      share|improve this answer



























                        0














                        The owner of the files in /proc/[pid]/ is not always the user -- programs can e.g. make themselves "non-dumpable" to avoid leaking sensitive information if they become another user, and then the file ownership of the files in the directory can change to root.



                        But normally the UID of the process can be retrieved by an fstat call (or a stat command ) on the /proc/[pid] directory itself.






                        share|improve this answer

























                          0












                          0








                          0







                          The owner of the files in /proc/[pid]/ is not always the user -- programs can e.g. make themselves "non-dumpable" to avoid leaking sensitive information if they become another user, and then the file ownership of the files in the directory can change to root.



                          But normally the UID of the process can be retrieved by an fstat call (or a stat command ) on the /proc/[pid] directory itself.






                          share|improve this answer













                          The owner of the files in /proc/[pid]/ is not always the user -- programs can e.g. make themselves "non-dumpable" to avoid leaking sensitive information if they become another user, and then the file ownership of the files in the directory can change to root.



                          But normally the UID of the process can be retrieved by an fstat call (or a stat command ) on the /proc/[pid] directory itself.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 25 at 20:30









                          Alexis CouseinAlexis Cousein

                          261 bronze badge




                          261 bronze badge



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f38366362%2fis-there-a-way-to-identify-the-user-who-owns-a-process-from-proc-pid%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                              SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                              은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현