# \[Pixelfed\] "File not found"

**URL:** <https://forum.yunohost.org/t/pixelfed-file-not-found/28038>\
**Category:** Support apps\
**Tags:** pixelfed, english\
**Created:** [January 14, 2024, 8:01pm UTC](https://forum.yunohost.org/t/pixelfed-file-not-found/28038 "2024-01-14T20:01:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cgKAF](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/b4bc9f/32.png) [@cgKAF](https://forum.yunohost.org/u/cgKAF)\
**Post date:** [January 14, 2024, 8:01pm UTC](https://forum.yunohost.org/t/pixelfed-file-not-found/28038/1 "2024-01-14T20:01:09Z")

</div>

### 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:

```auto
$ 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:

```auto
$ 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?

---

<div class="post-metadata">

**Author:** ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)\
**Post date:** [January 14, 2024, 8:29pm UTC](https://forum.yunohost.org/t/pixelfed-file-not-found/28038/2 "2024-01-14T20:29:15Z")

</div>

> [@cgKAF](#):
>
> ```auto
> $ sudo sh -c '/var/www/pixelfed php8.2 artisan config:cache'
> sh: 1: /var/www/pixelfed: Permission denied
> 
> ```

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:

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

```

---

<div class="post-metadata">

**Author:** ![cgKAF](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/b4bc9f/32.png) [@cgKAF](https://forum.yunohost.org/u/cgKAF)\
**Post date:** [January 14, 2024, 8:50pm UTC](https://forum.yunohost.org/t/pixelfed-file-not-found/28038/3 "2024-01-14T20:50:05Z")

</div>

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

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

```

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

---

<div class="post-metadata">

**Author:** ![cgKAF](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/b4bc9f/32.png) [@cgKAF](https://forum.yunohost.org/u/cgKAF)\
**Post date:** [January 14, 2024, 9:25pm UTC](https://forum.yunohost.org/t/pixelfed-file-not-found/28038/4 "2024-01-14T21:25:23Z")

</div>

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](https://forum.cloudron.io/topic/7942/disable-pixelfed-registration/2)).

---

<div class="post-metadata">

**Author:** ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)\
**Post date:** [January 29, 2024, 9:25pm UTC](https://forum.yunohost.org/t/pixelfed-file-not-found/28038/5 "2024-01-29T21:25:49Z")

</div>

Closed on January 29, 2024, 9:25pm UTC

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