[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: default group ownership of a file



ChadDavis wrote:
Hello.  I need to know how the group ownership of a file is decided in
debian.  Also, is it the same for all linux systems?


To actually answer your question: files are saved with the user and
group ownerships of the effective user. For almost all applications,
this is the user who is logged in and operating the application.

System programs will run under different user and group IDs than the
person logged in, and will assign file ownership accordingly e.g. in
/var/log under Debian, most files are root:adm, some are root:root.

Vulnerable programs such as mail and web servers normally run as a
reserved, unprivileged user to minimise the damage they can do if
compromised. Apache normally runs as www-data:www-data on Debian.
Many, such as Samba, use the nobody:nogroup user and group but the
danger here is that if one such program is compromised it can damage
the files belonging to the others. Separate users and groups are better.
User and group allocations of system programs vary between Linux
distributions, though standardisation is slowly creeping in.

When a user is created, a group is also created with the same name and
ID. This is the primary group the user belongs to, and is the owning
group of a new file created by that user using most applications. These
are defaults and can be changed and as far as I know, other Linux
distributions do the same.



Reply to: