I’ve decided to try installing PieFed with Docker again and I was finally able to log in now without a CSFR Token warning. I was able to test federation with the remote server scan and that seems to be working. I was also able to create a text post just fine but when I tried to post a picture to my own instance, I got the following error:
Your post was not accepted because [Errno 13] Permission denied: ‘app/static/media/posts’
I’m using a Raspberry Pi 5 with Pi OS (Debian 12, ARM64). I didn’t change anything in compose.yml. Besides that, I think everything else is working fine. I’m not sure what would be causing this issue.
I had this problem too. See how in the root of the site there is a directory called ‘media’, owned by root?
rimu@debian:~/docker/piefed/site$ ls -l total 196 drwxr-xr-x 23 rimu rimu 4096 Dec 14 15:00 app -rw-r--r-- 1 rimu rimu 51 Dec 14 14:06 babel.cfg -rw-r--r-- 1 rimu rimu 271 Dec 14 14:06 celery_worker.default.py -rw-r--r-- 1 rimu rimu 112 Dec 14 14:06 celery_worker_docker.py -rw-r--r-- 1 rimu rimu 1107 Jan 28 09:00 compose.yaml -rw-r--r-- 1 rimu rimu 2898 Dec 14 14:06 config.py lrwxrwxrwx 1 rimu rimu 39 Dec 14 14:06 contributing.md -> docs/project_management/contributing.md -rwxr-xr-x 1 rimu rimu 89 Dec 14 14:06 daily.sh -rwxr-xr-x 1 rimu rimu 287 Dec 14 14:06 deploy.sh -rw-r--r-- 1 rimu rimu 1003 Dec 14 14:06 dev_notes.txt -rw-r--r-- 1 rimu rimu 487 Dec 16 09:22 Dockerfile drwxr-xr-x 4 rimu rimu 4096 Dec 14 14:06 docs -rwxr-xr-x 1 rimu rimu 148 Dec 14 14:06 email_notifs.sh -rwxr-xr-x 1 rimu rimu 73 Dec 14 14:06 entrypoint_celery.sh -rwxr-xr-x 1 rimu rimu 144 Jan 28 09:03 entrypoint.sh -rw-r--r-- 1 rimu rimu 711 Dec 14 14:06 env.sample -rw-r--r-- 1 rimu rimu 2308 Dec 14 14:06 FEDERATION.md -rw-r--r-- 1 rimu rimu 283 Dec 14 14:06 gunicorn.conf.py -rw-r--r-- 1 rimu rimu 20047 Dec 14 14:06 INSTALL.md -rw-r--r-- 1 rimu rimu 4502 Dec 14 14:06 interests.txt -rw-r--r-- 1 rimu rimu 34472 Dec 14 14:06 LICENSE drwxr-xr-x 2 rimu rimu 4096 Dec 14 15:03 logs drwxr-xr-x 2 root root 4096 Dec 16 09:30 media drwxr-xr-x 3 rimu rimu 4096 Dec 14 14:06 migrations -rwxr-xr-x 1 rimu rimu 79 Dec 14 14:06 mini_deploy.sh drwx------ 19 ollama root 4096 Jan 28 09:03 pgdata -rw-r--r-- 1 rimu rimu 1622 Dec 14 14:06 profile_app.py drwxr-xr-x 2 rimu rimu 4096 Dec 14 15:00 __pycache__ -rw-r--r-- 1 rimu rimu 4067 Dec 14 14:06 pyfedi.py -rw-r--r-- 1 rimu rimu 799 Dec 14 14:06 README.md -rw-r--r-- 1 rimu rimu 42 Dec 14 14:06 regional.txt -rwxr-xr-x 1 rimu rimu 91 Dec 14 14:06 remove_orphan_files.sh -rw-r--r-- 1 rimu rimu 624 Dec 14 14:06 requirements.txt drwxr-xr-x 2 rimu rimu 4096 Dec 14 14:06 testing_data -rw-r--r-- 1 rimu rimu 353 Dec 14 14:06 test_interest_parse.py -rw-r--r-- 1 rimu rimu 1524 Dec 14 14:06 test_signature.py -rwxr-xr-x 1 rimu rimu 91 Dec 14 14:06 weekly.sh
That needs to be owned by me/you instead of root. Shut down the containers, then run
sudo chown -R rimu:rimu ./media
(but change ‘rimu’ to your user name).Then start the containers again.