Skip to content

Don't change directory permissions on each service startup #179

@df7cb

Description

@df7cb

In https://bugs.debian.org/1110829 it was reported that the stock pgcluu .service files update the directory permissions on each startup, overwriting user customizations:

[Service]
PermissionsStartOnly=true
User=postgres
Environment=STATDIR=/var/lib/pgcluu/data
Environment=REPORTDIR=/var/lib/pgcluu/report
ExecStartPre=-/bin/mkdir -p $REPORTDIR
ExecStartPre=-/bin/chown postgres:www-data $REPORTDIR
ExecStartPre=-/bin/chmod u=rwX,g=rsX,o= $REPORTDIR
ExecStart=/usr/local/bin/pgcluu -o $REPORTDIR $STATDIR

For the Debian package, we now use a "tmpfiles" snippet instead:

# STATDIR
D /var/lib/pgcluu/data 02750 postgres www-data -
# REPORTDIR
D /var/lib/pgcluu/report 02750 postgres www-data -

Perhaps this change could also be adopted upstream in pgcluu.

https://salsa.debian.org/postgresql/pgcluu/-/commit/f21d19f25b5e3bbb50110b69bdc929664c56e543

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions