12345678910111213141516171819202122232425262728293031 |
- ---
- title: From /public/avatar to /file/avatar: something keeps it from working
- author: notabug.org/aab
- time: Wed, 08 Apr 2020 09:15:23 UTC
- status: closed
- ---
- author: notabug.org
- time: Wed, 08 Apr 2020 09:15:23 UTC
- content: -----
- Since the last update in nightly, which changed /public/avatar to /file/avatar, i was getting a lot of these in the logs: <code>[error] 779#779: *482939 FastCGI sent in stderr: "PHP message: PHP Warning: rename(/tmp/listener_avatarhMZ0XD,/var/www/gnusocial/file/avatar/126463-original-20200407151424.jpeg): No existe el fichero o el directorio in /var/www/gnusocial/plugins/ActivityPub/lib/explorer.php on line 332PHP message: PHP Warning: chmod(): No existe el fichero o el directorio in /var/www/gnusocial/plugins/ActivityPub/lib/explorer.php on line 345" while reading response header from upstream, client: ip_address, server: gnusocial.net, request: "POST /user/2235/inbox.json HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net"</code> I followed several suggestions from diogo and someonewithpc: - The obvious, moving manually the directory: avatars were missing. - Checkin in admin's UI: settings are correct. - Checking with setconfig, which seems to be fine: <code>avatar server '' avatar dir '/var/www/gnusocial/file/avatar/' avatar url_base '/avatar/' avatar ssl NULL avatar maxsize 300 avatar path '/file/avatar/'</code> - Checking db, which again, seems to be fine: ````sh MariaDB [gnusocial]> select * from config where section = 'avatar'; +---------+---------+---------------------------------+ | section | setting | value | +---------+---------+---------------------------------+ | avatar | dir | /var/www/gnusocial/file/avatar/ | | avatar | path | /file/avatar/ | | avatar | server | | +---------+---------+---------------------------------+ ```` I've managed to silence the logs soft-linking the locations (file/avatar -> /var/www/gnusocial/public/avatar/), but obviously, i'd like to fix this properly. Do you know any other place where locations could be stored (with the wrong settings)?
- -----
- author: notabug.org
- time: Wed, 08 Apr 2020 10:46:40 UTC
- content: -----
- Are the files actually missing? It seems you have avatar path set again, which last time fixed it. Try `delete * from config where section = 'avatar'`. I'll look more into this bug, clearly something _is_ wrong
- -----
- author: notabug.org
- time: Wed, 08 Apr 2020 11:25:17 UTC
- content: -----
- No, that error was showing every time an avatar was requested; they exist, just in the wrong place :) Now: - I've deleted the simlink and moved avatar inside file: all avatars missing in UI, as expected. - "delete * from config where section = 'avatar';" didn't work; "delete from config where section = 'avatar';" did. No avatar coincidences after this, as expected. Missing avatars in UI. - Moving avatar back to public brings avatars in UI again, and the error in logs as well. - Recreating the simlink makes the error in log dissapear. - Just in case, checked db and no avatar section exists.
- -----
- author: notabug.org
- time: Sun, 26 Apr 2020 11:14:30 UTC
- content: -----
- Ok, i was able to fix this eventually. Avatar is now inside of File, no simlink to Public needed. I just had to redo the steps some more times for it to work :) There are a lot of avatars missing anyway, i'm trying to recover them with "ActivityPub/scripts/update_activitypub_profiles.php -a" and "OStatus/scripts/update_ostatus_profiles.php -a". So, i think this bug is fixed, thanks!
- -----
|