1. Este site usa cookies. Ao continuar a usar este site está a concordar com o nosso uso de cookies. Saber Mais.

Significado dos campos de um utilizador de um processo

Discussão em 'Dúvidas e Suporte Técnico - GNU/Linux & *nix' iniciada por Nausea, 30 de Novembro de 2008. (Respostas: 2; Visualizações: 1178)

  1. Nausea

    Nausea Power Member

    Boas vou logo direito ao assunto. Se vocês fizerem cat /proc/PID/status em que PID é o identificador do processo. Vai aparecer uma data de informação relativamente ao processo.
    Por exemplo cat/proc/3280/status aparece o seguinte:
    o que eu quero saber é relativamente ao Uid o significado concreto dos 4 campos neste caso são "Uid: 0 1000 0 1000" cada coluna representa o quê?

    Obrigado.
     
  2. slack_guy

    slack_guy Power Member

    Código:
    $ man credentials
    .........
           On Linux, each process has the following user and group identifiers:
    
           * [B] Real user ID[/B] and real group ID.  These IDs determine who  owns  the  process.   A
              process can obtain its real user (group) ID using getuid(2) (getgid(2)).
    
           *  [B]Effective  user  ID[/B]  and effective group ID.  These IDs are used by the kernel to
              determine the permissions that  the  process  will  have  when  accessing  shared
              resources  such  as  message queues, shared memory, and semaphores.  On most Unix
              systems, these IDs also determine the permissions when accessing files.  However,
              Linux  uses  the  file  system  IDs described below for this task.  A process can
              obtain its effective user (group) ID using geteuid(2) (getegid(2)).
    
           *  [B]Saved set-user-ID[/B] and saved set-group-ID.  These IDs are used in set-user-ID  and
              set-group-ID programs to save a copy of the corresponding effective IDs that were
              set when the program was executed (see execve(2)).   A  set-user-ID  program  can
              assume  and  drop  privileges  by  switching its effective user ID back and forth
              between the values in its real user ID and saved set-user-ID.  This switching  is
              done  via calls to seteuid(2), setreuid(2), or setresuid(2).  A set-group-ID pro-
              gram performs the analogous tasks using setegid(2), setregid(2), or setresgid(2).
              A  process  can  obtain  its  saved set-user-ID (set-group-ID) using getresuid(2)
              (getresgid(2)).
    
           *  [B]File system user ID[/B] and file system group ID  (Linux-specific).   These  IDs,  in
              conjunction  with the supplementary group IDs described below, are used to deter-
              mine permissions for accessing files; see path_resolution(7) for details.   When-
              ever  a process's effective user (group) ID is changed, the kernel also automati-
              cally changes the file system user (group) ID to the same  value.   Consequently,
              the  file system IDs normally have the same values as the corresponding effective
              ID, and the semantics for file-permission checks are thus the same on Linux as on
              other Unix systems.  The file system IDs can be made to differ from the effective
              IDs by calling setfsuid(2) and setfsgid(2).
    .....
    
     
  3. Nausea

    Nausea Power Member

    Muito Obrigado, era mesmo isso que eu queria saber.
     

Partilhar esta Página