Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

391
Visualizações
when a file is generated by an executable, what is the file's user and group on linux

I have an executable with user as root and group as ddd

-rwxr-x--- 1 root ddd 30050496 Jan  1  2021 exed

exed will use fd = open(filename, O_CREAT | O_RDWR,0664); and write(fd, buff, size); to write a file to the hard disk. There is no place to change the group of the filename in the source code.

But I found after running the exed, the filename has fff as group. How did this happen? Should the file's group be ddd?

-rw-rw---- 1 root fff  11236167 Nov 13 04:28 filename
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The file's owner will be the effective UID of the process that creates it, and the group will be the effective GID of the process.

The exception is if the directory where the file is created has the setgid permission bit set. Then the group will be the group of the directory.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda