Skip to content

Commit 3a5766d

Browse files
authored
Merge pull request #1630 from RaspAP/sec/restapi-svc
Security: set restapi.service file ownership
2 parents 98c2a7c + 4afd67f commit 3a5766d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

installers/common.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,9 @@ function _install_restapi() {
544544

545545
fi
546546
python3 -m pip install -r "$raspap_dir/api/requirements.txt" --break-system-packages || _install_status 1 " Unable to install pip modules"
547-
547+
548+
echo "Setting permissions on restapi systemd unit control file"
549+
sudo chown -c root:root $webroot_dir/installers/restapi.service || _install_status 1 "Unable change owner and/or group"
548550
echo "Moving restapi systemd unit control file to /lib/systemd/system/"
549551
sudo mv $webroot_dir/installers/restapi.service /lib/systemd/system/ || _install_status 1 "Unable to move restapi.service file"
550552
sudo systemctl daemon-reload

0 commit comments

Comments
 (0)