Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

384
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!