[Pixelfed] "File not found"

My YunoHost server

Hardware: Lenovo ThinkCentre M720q
YunoHost version: 11.2.9.1 (stable)
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If your request is related to an app, specify its name and version: Pixelfed, 0.11.9~ynh3

I have completed a brand new installation of Pixelfed, and followed these instructions that are found in Yunohost Admin Panel > Applications > Pixelfed:

Allow/Close registrations

Registrations are open by default.
To change that setting, edit /var/www/pixelfed/.env and set OPEN_REGISTRATION=false instead of true.
Then run php8.2 artisan config:cache (from the app /var/www/pixelfed… folder) to reload the settings.

For some reason, my server does not allow me to change directory with cd, so to get around this I have been using sudo sh -c '/path/to/command <arguments, etc.>' as a workaround.

I edited the .env file, and then when I tried this with the commands exactly as they are above, I got a ‘Permission denied’ error:

$ sudo sh -c '/var/www/pixelfed php8.2 artisan config:cache'
sh: 1: /var/www/pixelfed: Permission denied

However, I noticed that the section above this, about promoting the first-registered account as an administrator, used different syntax in its command:
sudo php8.2 /var/www/pixelfed/artisan user:admin 1
So I thought I’d try that instead, and lo and behold:

$ sudo php8.2 /var/www/pixelfed/artisan config:cache

   INFO  Configuration cached successfully.  

However, now, when I go back to Pixelfed in my browser and refresh the page, I’m presented with a white screen and the words “File not found” at the top.

Does anyone know why, and where to go from here?

you are trying to execute a folder (/var/www/pixelfed) as if it’s a program, hence it doesn’t make sense and Linux throws a “permission denied”

You’re probably looking for something like:

sudo yunohost app shell pixelfed
php8.2 artisan config:cache

That’s why I tried it the other way, which led to the white screen I’m now getting with “File not found” at the top.

Just now, when I tried

sudo yunohost app shell pixelfed
php8.2 artisan config:cache

…I got an error saying, Could not open input file: artisan.

Resolved – I just reinstalled Pixelfed, taking a backup before and after.

Edit: On reinstalling, I:

  • Set myself as the admin user, as per the instructions in Yunohost Admin Panel > Applications > Pixelfed
  • Ran $ sudo nano /var/www/pixelfed.env and set OPEN_REGISTRATION=false (saved with CTRL+O and exited with CTRL+X)
  • Then I ran
    $ sudo yunohost app shell pixelfed
    then, when ready, followed by
    php8.2 artisan config:cache
    …and got a success message.

Then when I found that the option to register to my Pixelfed instance was still open, I logged in, found the Admin panel had appeared in the drop-down under my avatar, and in there found Settings > unchecked the ‘Open Registrations’ box (image here).

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.