Bug 733149

Summary: Daemon GIDs default to UIDs, not primary GIDs
Product: [Fedora] Fedora Reporter: Garrett Holmstrom <gholms>
Component: systemdAssignee: Lennart Poettering <lpoetter>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: harald, johannbg, kay, lpoetter, metherid, mschmidt, notting, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-25 00:03:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Garrett Holmstrom 2011-08-24 21:57:46 UTC
Description of problem:
Services that supply User= directives but not Group= directives in their service files end up with processes that have GIDs equal to their UIDs instead of the given users' primary GIDs as systemd.exec(5) suggests.  For example, if a service file refers to a user with UID 1 and GID 2 and it does not explicitly specify a group, the resulting process will have GID 1.


Version-Release number of selected component (if applicable):
systemd-26-8.fc15.x86_64


How reproducible:
Always


Steps to Reproduce:
1. groupadd -g 255 testgroup
2. useradd -g 255 -u 256 testuser
3. echo -e '#!/bin/sh\nlogger `id`' > /usr/bin/log_id.sh
4. cat > /etc/systemd/system/bugtest.service << EOF
[Unit]
Description=Bug test

[Service]
Type=oneshot
User=testuser
ExecStart=/usr/bin/log_id.sh
EOF
5. systemctl start bugtest.service
6. grep testuser /var/log/messages


Actual results:
logger: uid=256(testuser) gid=256 groups=255(testgroup),256


Expected results:
logger: uid=256(testuser) gid=255(testgroup) groups=255(testgroup)

Comment 1 Lennart Poettering 2011-08-25 00:03:14 UTC

*** This bug has been marked as a duplicate of bug 723892 ***