Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File & Folder Permissions - Need Help #105

Open
hackdefendr opened this issue Jan 4, 2023 · 1 comment
Open

File & Folder Permissions - Need Help #105

hackdefendr opened this issue Jan 4, 2023 · 1 comment

Comments

@hackdefendr
Copy link

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

@miri64
Copy link

miri64 commented Jul 24, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants