Giter Site home page Giter Site logo

Comments (12)

lapineige avatar lapineige commented on September 22, 2024

ping @sekretaerbaer (pixelfed/pixelfed#4275 (comment)) I merged a change that should restore a working condition to files with the issues (once the PR is merged to master): 013c3d6

This will reset your filsystems.php, for good : it avoids giving too much access rights to this files while restoring a working state :)

ping @webmink, once this is closed by merging #224 you will have a proper working version :)

from pixelfed_ynh.

webmink avatar webmink commented on September 22, 2024

It will be a delight :-) Currently having to use Flickr for blog illustrations... Thanks so much.

from pixelfed_ynh.

lapineige avatar lapineige commented on September 22, 2024

I worked in my case.
If you can use the command line, you can try it.
If not, I'm probably merging this today :)

from pixelfed_ynh.

webmink avatar webmink commented on September 22, 2024

I'll wait for the merge, too much going on to go hack the server until about Tuesday

from pixelfed_ynh.

lapineige avatar lapineige commented on September 22, 2024

Merged :)

from pixelfed_ynh.

Jaxom99 avatar Jaxom99 commented on September 22, 2024

I encountered this error, as described in #211 . It's on a new install of the app on a fresh server. I did not find how to fix it on the thread, apart from upgrades... What data can I provide ? ping @lapineige

ln my case, there was a failed restore of the same app from another server (from mid-august, so same version I guess ?) just before (it was well handed by ynh, I have logs if needed). And when encountering the bug, I removed and reinstalled the app (via ynh) but that changed nothing.
=> Maybe on these operations, some files are not removed, and so I'm not on last version everywhere ? Where should I look to correct that ?

from pixelfed_ynh.

lapineige avatar lapineige commented on September 22, 2024

Can you follow this and share the results ?
https://forum.yunohost.org/t/pixelfed-0-11-9-instagram-import-no-preview-after-import/26071/4

I can provide more detailed instructions.
Basically the issue is that the images have incorrect file permissions.

from pixelfed_ynh.

Jaxom99 avatar Jaxom99 commented on September 22, 2024

Thanks. Here are the results :

  • list of root directory
frhb82747flex:~# ls -l /var/www/pixelfed/public/storage/m/_v2/*
total 4 drwx------ 3 pixelfed www-data 4096 Aug 28 10:06 c51ea9690-856390
  • List of a folder
frhb82747flex:~# ls -l /var/www/pixelfed/public/storage/m/_v2/601716093526560769/c51ea9690-856390/krfiZNpivCpu/
total 232
-rw-r--r-- 1 pixelfed pixelfed 174398 Aug 28 12:27 YryRfx2Q7gdQcyq0oVW1i7dTd32qVfLeVTb3kEmY.jpg
-rw-r--r-- 1 pixelfed pixelfed  58209 Aug 28 12:27 YryRfx2Q7gdQcyq0oVW1i7dTd32qVfLeVTb3kEmY_thumb.jpg
  • Name-i
frhb82747flex:~# namei -l /var/www/pixelfed/public/storage/m/_v2/
f: /var/www/pixelfed/public/storage/m/_v2/
drwxr-xr-x root     root     /
drwxr-xr-x root     root     var
drwxr-xr-x root     root     www
drwxr-x--- pixelfed www-data pixelfed
drwxrwx--- pixelfed www-data public
lrwxrwxrwx root     root     storage -> /var/www/pixelfed/storage/app/public
drwxr-xr-x root     root       /
drwxr-xr-x root     root       var
drwxr-xr-x root     root       www
drwxr-x--- pixelfed www-data   pixelfed
drwxrwx--- pixelfed www-data   storage
drwxrwx--- pixelfed www-data   app
drwxrwx--- pixelfed www-data   public
drwxrwx--- pixelfed www-data m
drwx------ pixelfed www-data _v2
  • content of /etc/php/8.2/fpm/pool.d/pixelfed.conf

[pixelfed]

user = pixelfed
group = pixelfed

chdir = /var/www/pixelfed

listen = /var/run/php/php8.2-fpm-pixelfed.sock
listen.owner = www-data
listen.group = www-data

pm = ondemand
pm.max_children = 24
pm.max_requests = 500
request_terminate_timeout = 1d


pm.process_idle_timeout = 10s

; Additional php.ini defines, specific to this pool of workers.

php_admin_value[upload_max_filesize] = 100M
php_admin_value[post_max_size] = 100M

; Group should not be pixelfed, unless image (folder) access rights are not working
group = www-data

from pixelfed_ynh.

Jaxom99 avatar Jaxom99 commented on September 22, 2024

Just tested the branch with yunohost app upgrade pixelfed -u https://github.com/YunoHost-Apps/pixelfed_ynh/tree/fix_php_conf_image-permissions, and it's so weird : it made the previous post OK, but a new one is in the same "no preview" state. See screencap : https://pic.infini.fr/gallery#WvnDhSXo/hhynm955.png

Also folder state :

oc:/var/www/pixelfed/public/storage/m/_v2/601716093526560769/c51ea9690-856390# ls -lah
total 20K
drwxr-x--- 5 pixelfed www-data 4.0K Aug 31 08:17 .
drwxrwx--- 3 pixelfed www-data 4.0K Aug 28 10:06 ..
drwxr-x--- 2 pixelfed pixelfed 4.0K Aug 31 08:17 GymuhRTWfBIe
drwxr-x--- 2 pixelfed www-data 4.0K Aug 28 12:27 krfiZNpivCpu
drwxr-x--- 2 pixelfed www-data 4.0K Aug 28 13:05 Qbe51HU0U7u1

new post :

ls -lah GymuhRTWfBIe/
total 200K
drwxr-x--- 2 pixelfed pixelfed 4.0K Aug 31 08:17 .
drwxr-x--- 5 pixelfed www-data 4.0K Aug 31 08:17 ..
-rw-r--r-- 1 pixelfed pixelfed 157K Aug 31 08:17 DLnLoFC8PI3jfErTHGwfzNFAUaNjYNw0KdSL5PuS.jpg
-rw-r--r-- 1 pixelfed pixelfed  31K Aug 31 08:17 DLnLoFC8PI3jfErTHGwfzNFAUaNjYNw0KdSL5PuS_thumb.jpg

old post :

ls -lah krfiZNpivCpu/
total 240K
drwxr-x--- 2 pixelfed www-data 4.0K Aug 28 12:27 .
drwxr-x--- 5 pixelfed www-data 4.0K Aug 31 08:17 ..
-rwxr-x--- 1 pixelfed www-data 171K Aug 28 12:27 YryRfx2Q7gdQcyq0oVW1i7dTd32qVfLeVTb3kEmY.jpg
-rwxr-x--- 1 pixelfed www-data  57K Aug 28 12:27 YryRfx2Q7gdQcyq0oVW1i7dTd32qVfLeVTb3kEmY_thumb.jpg

🀞

from pixelfed_ynh.

lapineige avatar lapineige commented on September 22, 2024

it made the previous post OK

This is expected: https://github.com/YunoHost-Apps/pixelfed_ynh/blob/master/scripts/upgrade#L160
We fix the rights on every upgrade, just in case (it can't do any harm).

but a new one is in the same "no preview" state

So it was buggy after all… I might have fixed mine and forgot it.

Can you show me the content of /etc/php/8.2/fpm/pool.d/pixelfed.conf ?

from pixelfed_ynh.

Jaxom99 avatar Jaxom99 commented on September 22, 2024
oc:/home/testadmin# cat /etc/php/8.2/fpm/pool.d/pixelfed.conf 

[pixelfed]

user = pixelfed
group = pixelfed

chdir = /var/www/pixelfed

listen = /var/run/php/php8.2-fpm-pixelfed.sock
listen.owner = www-data
listen.group = www-data

pm = ondemand
pm.max_children = 24
pm.max_requests = 500
request_terminate_timeout = 1d


pm.process_idle_timeout = 10s

😱
and yet, it was updated indeed :

ls -lah /etc/php/8.2/fpm/pool.d/pixelfed.conf 
-r-------- 1 root root 291 Aug 31 07:49 /etc/php/8.2/fpm/pool.d/pixelfed.conf

from pixelfed_ynh.

lapineige avatar lapineige commented on September 22, 2024

Change group = pixelfed to group = www-data to fix it.
(or don't, to test if a future fix solves it. In the midtime, a simple chown -R :www-data /brokenPictureFolder could fix it)

I don't understand why it's not applied : https://github.com/YunoHost-Apps/pixelfed_ynh/blob/fix_php_conf_image-permissions/conf/php-fpm.conf#L5

from pixelfed_ynh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.