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?
```bash
sudo groupadd responses
sudo usermod -aG responses lovinator
sudo usermod -aG responses ttvdrops
sudo chown -R ttvdrops:http /home/ttvdrops/.local/share/TTVDrops/media/
sudo chgrp -R http /home/ttvdrops/.local/share/TTVDrops/media
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 lovinator:responses /mnt/fourteen/Data/ttvdrops
sudo chmod -R 2775 /mnt/fourteen/Data/Responses
sudo chmod -R 2775 /mnt/fourteen/Data/ttvdrops
# 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
sudo chown -R ttvdrops:http /home/ttvdrops/.local/share/TTVDrops/datasets/
sudo chgrp -R http /home/ttvdrops/.local/share/TTVDrops/datasets/
sudo find /home/ttvdrops/.local/share/TTVDrops/datasets -type d -exec chmod 2775 {} \;
sudo find /home/ttvdrops/.local/share/TTVDrops/datasets -type f -exec chmod 664 {} \;
```

View file

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