Add SupplementaryGroups and UMask settings to systemd service files
All checks were successful
Deploy to Server / deploy (push) Successful in 12s

This commit is contained in:
Joakim Hellsén 2026-03-16 23:14:36 +01:00
commit 4fb13b27fd
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
3 changed files with 13 additions and 18 deletions

View file

@ -114,22 +114,13 @@ uv run python manage.py backup_db --output-dir "<path>" --prefix "ttvdrops"
### How the duck does permissions work on Linux? ### How the duck does permissions work on Linux?
```bash ```bash
sudo groupadd responses sudo chown -R ttvdrops:http /home/ttvdrops/.local/share/TTVDrops/media/
sudo usermod -aG responses lovinator sudo chgrp -R http /home/ttvdrops/.local/share/TTVDrops/media
sudo usermod -aG responses ttvdrops sudo find /home/ttvdrops/.local/share/TTVDrops/media -type d -exec chmod 2775 {} \;
sudo find /home/ttvdrops/.local/share/TTVDrops/media -type f -exec chmod 664 {} \;
sudo chown -R lovinator:responses /mnt/fourteen/Data/Responses sudo chown -R ttvdrops:http /home/ttvdrops/.local/share/TTVDrops/datasets/
sudo chown -R lovinator:responses /mnt/fourteen/Data/ttvdrops sudo chgrp -R http /home/ttvdrops/.local/share/TTVDrops/datasets/
sudo chmod -R 2775 /mnt/fourteen/Data/Responses sudo find /home/ttvdrops/.local/share/TTVDrops/datasets -type d -exec chmod 2775 {} \;
sudo chmod -R 2775 /mnt/fourteen/Data/ttvdrops sudo find /home/ttvdrops/.local/share/TTVDrops/datasets -type f -exec chmod 664 {} \;
# Import dir
sudo setfacl -b /mnt/fourteen/Data/Responses /mnt/fourteen/Data/Responses/imported
sudo setfacl -m g:responses:rwx /mnt/fourteen/Data/Responses /mnt/fourteen/Data/Responses/imported
sudo setfacl -d -m g:responses:rwx /mnt/fourteen/Data/Responses /mnt/fourteen/Data/Responses/imported
# Backup dir
sudo setfacl -b /mnt/fourteen/Data/ttvdrops
sudo setfacl -m g:responses:rwx /mnt/fourteen/Data/ttvdrops
sudo setfacl -d -m g:responses:rwx /mnt/fourteen/Data/ttvdrops
``` ```

View file

@ -7,6 +7,8 @@ Wants=network-online.target
Type=simple Type=simple
User=ttvdrops User=ttvdrops
Group=ttvdrops Group=ttvdrops
SupplementaryGroups=http
UMask=0002
WorkingDirectory=/home/ttvdrops/ttvdrops WorkingDirectory=/home/ttvdrops/ttvdrops
EnvironmentFile=/home/ttvdrops/ttvdrops/.env EnvironmentFile=/home/ttvdrops/ttvdrops/.env
ExecStart=/usr/bin/uv run python manage.py watch_imports /mnt/fourteen/Data/Responses/pending --verbose ExecStart=/usr/bin/uv run python manage.py watch_imports /mnt/fourteen/Data/Responses/pending --verbose

View file

@ -7,6 +7,8 @@ Wants=network-online.target
Type=oneshot Type=oneshot
User=ttvdrops User=ttvdrops
Group=ttvdrops Group=ttvdrops
SupplementaryGroups=http
UMask=0002
WorkingDirectory=/home/ttvdrops/ttvdrops WorkingDirectory=/home/ttvdrops/ttvdrops
EnvironmentFile=/home/ttvdrops/ttvdrops/.env EnvironmentFile=/home/ttvdrops/ttvdrops/.env
ExecStart=/usr/bin/uv run python manage.py import_kick_drops ExecStart=/usr/bin/uv run python manage.py import_kick_drops