fix: set limited permissions on package installs (#23683)
* fix: set limited permissions on package installs * fix: set umask in systemd service to create files as 0750pull/23723/head
parent
485968cce4
commit
b51fefdf6d
|
@ -111,8 +111,8 @@ elif [[ -f /etc/debian_version ]]; then
|
||||||
# Moving these lines out of this if statement would make `rmp -V` fail after installation.
|
# Moving these lines out of this if statement would make `rmp -V` fail after installation.
|
||||||
chown -R -L influxdb:influxdb $LOG_DIR
|
chown -R -L influxdb:influxdb $LOG_DIR
|
||||||
chown -R -L influxdb:influxdb $DATA_DIR
|
chown -R -L influxdb:influxdb $DATA_DIR
|
||||||
chmod 755 $LOG_DIR
|
chmod 750 $LOG_DIR
|
||||||
chmod 755 $DATA_DIR
|
chmod 750 $DATA_DIR
|
||||||
|
|
||||||
# Debian/Ubuntu logic
|
# Debian/Ubuntu logic
|
||||||
if command -v systemctl &>/dev/null; then
|
if command -v systemctl &>/dev/null; then
|
||||||
|
|
|
@ -15,6 +15,7 @@ KillMode=control-group
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
Type=forking
|
Type=forking
|
||||||
PIDFile=/var/lib/influxdb/influxd.pid
|
PIDFile=/var/lib/influxdb/influxd.pid
|
||||||
|
UMask=0027
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -58,7 +58,10 @@ function run_fpm()
|
||||||
--after-remove control/postrm \
|
--after-remove control/postrm \
|
||||||
`# package files` \
|
`# package files` \
|
||||||
--chdir fs/ \
|
--chdir fs/ \
|
||||||
--package /artifacts
|
--package /artifacts \
|
||||||
|
--directories /var/lib/influxdb \
|
||||||
|
--rpm-defattrdir 750 \
|
||||||
|
--rpm-defattrfile 750
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue