[FIX] Default permissions for static files

A little fallacy on my end in the docs.

655 is enough for files in those directories, but the directories themselves need to be traversal, so 755 for the directories ...
This commit is contained in:
Peter Pfeufer 2022-09-22 19:54:58 +02:00
parent 6154d2c2e7
commit 5815bac0df
No known key found for this signature in database
GPG Key ID: 6051D2C6AD4EBC27

View File

@ -13,9 +13,15 @@ The migration itself is rather straightforward. The main idea is to change owner
First, log in as your sudo user and run the following commands in order:
```shell
# Set the right owner
sudo chown -R allianceserver: /home/allianceserver
sudo chown -R allianceserver: /var/www/myauth
sudo chmod -R 655 /var/www/myauth
# Remove static files, they will be re-added later
sudo rm -rf /var/www/mayauth/static/*
# Fix directory permissions
sudo chmod -R 755 /var/www/myauth
```
That's it. Your AA installation is now configured to be maintained with the `allianceserver` user.
@ -45,6 +51,13 @@ Finally, switch to the main AA folder, from where you can run most commands dire
cd myauth
```
Now it's time to re-add the static files with the right permissions. To do so simply
run:
```shell
python manage.py collectstatic
```
When you want to restart myauth, you need to switch back to your sudo user, because `allianceserver` does not have sudo privileges:
```shell