Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

392
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda