File & Folder Permissions - Need Help
My instance is up and running, but every uploaded image won't display. When I look at the storage folder structure, none of the created folders have the executable flag set for folders. I have to manually chmod +x the folders and refresh the page to see the uploaded images. I have tried everything I can think of and just cannot figure this one out.
Here is the error in the log:
2023/01/04 19:10:54 [crit] 183992#183992: *937 stat() "/var/www/pixelfed/public/storage/m/_v2/515538758400753665/3079cad20-917577/vtN2psVBRtH2/YSZdO0Fjpiq7VN3UTwPwCHdDTtmZytMo4yMh80BM.jpg" failed (13: Permission denied), client: 23.111.147.234, server: pixfrom.unpopular.cloud, request: "GET /storage/m/_v2/515538758400753665/3079cad20-917577/vtN2psVBRtH2/YSZdO0Fjpiq7VN3UTwPwCHdDTtmZytMo4yMh80BM.jpg HTTP/2.0", host: "pixfrom.unpopular.cloud", referrer: "https://pixfrom.unpopular.cloud/i/web/post/516329955341889545"
Here is my php-fpm configuration:
[pixelfed]
user = pixelfed
group = pixelfed
listen = /run/php/pixelfed.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
Here is what the /run folder looks like:
root@pixfrom:~# ll /run/php/
total 4
drwxr-xr-x 2 www-data www-data 80 Jan 4 19:09 ./
drwxr-xr-x 33 root root 1040 Jan 4 14:20 ../
-rw-r--r-- 1 root root 6 Jan 4 19:09 php8.2-fpm.pid
srw-rw---- 1 www-data www-data 0 Jan 4 19:09 pixelfed.sock=
I did all of the user and group modifications. Can someone help me troubleshoot this? I got a feeling it is something easy and dumb and I just overlooked it.
Regards, J
I have the same problem. I have even set default permissions as described here, but still I always need to touch the file permissions of the directory by hand to set the group permissions correctly. Without, they are just 700 for the directory the file is put in.