Filesystem Error

Anyone have an issue like this? I transferred all my files from my local server to a live server. I did all the changes as requested here and the site works but I keep getting the error below when I try to click on Filesystem or trying to add an image to a Template Variable.


Have you verified that the file permissions are correct?

Yes. All folders are 0771 and files are 0644. I checked another website and they are the same

I also checked the file to be sure and it’s correct for the assets. I also cleared the cache

if (!defined('MODX_ASSETS_PATH')) {
    $modx_assets_path= '/var/www/web/assets/';
    $modx_assets_url= '/assets/';
    define('MODX_ASSETS_PATH', $modx_assets_path);
    define('MODX_ASSETS_URL', $modx_assets_url);

I checked File System in System Settings but nothing seems off

Did you check the Media Source “Filesystem” under “Media” → “Media Sources”?

Yes and nothing seems off compared to another MODX REVO project

I’m using Modx Revo 3.0.1

Does something get added to the MODX error log when you get the “File does not exist!” message in the manager?

I got this

[2024-03-21 11:42:36] (ERROR @ /var/www/web/core/src/Revolution/Sources/modMediaSource.php : 1202) Unable to retrieve the mime_type for file at location: .stats. finfo::file(/var/www/web/.stats): failed to open stream: Permission denied

So the file with the name .stats is the problem.
Try adding it to the “skipFiles” property in the Media Source “Filesystem” (if you can’t change the file permission).

But I don’t have this file in my root folder

File names that start with a dot are hidden. It’s probably there but you just can’t see it.

I understand that. I have Force SHowing Hidden Files in FileZilla turned on but still nothing

I went back to my local server and didn’t see that file either. SO I cleared the live server and transferred the files over again to see. Everything working except the Filesystem again.

I’ve never seen the .stats file before this. Could a plugin be causing the issue

My guess is that this file is created/used by the web hosting provider.

The file has to be there. Otherwise MODX wouldn’t output this error message.

Did you try this?

I’m touching base with the web host now

I haven’t tried this as I can’t see the file. Apologies if that sounds stupid but not 100% sure what to do here

You don’t have to see the file for this.

Go to “Media” → “Media Sources” and select the “Filesystem” media source.
The property “skipFiles” contains a comma-separated list of files that MODX should ignore when listing the files. Add .stats to the list and save.
MODX should now ignore this file and don’t show the error message.

BOOM!!! This worked a treat. Thanks a million

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.