Add SupplementaryGroups and UMask settings to systemd service files
All checks were successful
Deploy to Server / deploy (push) Successful in 12s
All checks were successful
Deploy to Server / deploy (push) Successful in 12s
This commit is contained in:
parent
60c9ccf01a
commit
4fb13b27fd
3 changed files with 13 additions and 18 deletions
25
README.md
25
README.md
|
|
@ -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
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue