alexusmai / laravel-file-manager

File manager for Laravel
MIT License
1.13k stars 290 forks source link

(FTP disk) 500 Error when creating a new folder - Directory not found #356

Open 7ammer opened 1 year ago

7ammer commented 1 year ago

When creating a folder via FTP disk I get the following status error:

- Directory not found
500 - Unable to retrieve the last_modified for file at location: test7.

The line that throws is line 138 in the ContentTrait.php file.

...
'timestamp'  => $adapter instanceof AwsS3V3Adapter ? null : Storage::disk($disk)->lastModified($path),
...

When I reload the page the folder shows so it does get created. If I put Storage::disk($disk)->directories() inside the directoryProperties method I can see the new folder but when calling Storage::disk($disk)->lastModified($path) it fails. So it looks like it's unable to get the meta data. I'm not sure.

My disk config is pretty simple:

        'ftp' => [
            'driver' => 'ftp',
            'host' => 'xyz',
            'username' => 'abc',
            'password' => '123',
            'ssl' => true,
        ],
volosan commented 1 year ago

The same issue with Laravel 10 and FTP disk. Fixed with commenting lines 137 and 138 in vendor/alexusmai/laravel-file-manager/src/Traits/ContentTrait.php:

'timestamp'  => $adapter instanceof AwsS3V3Adapter ? null : Storage::disk($disk)->lastModified($path),
'visibility' => $adapter instanceof AwsS3V3Adapter ? null : Storage::disk($disk)->getVisibility($path),

After page refreshing new folders are disappears.

volosan commented 1 year ago

The same issue with Laravel 10 and FTP disk. Fixed with commenting lines 137 and 138 in vendor/alexusmai/laravel-file-manager/src/Traits/ContentTrait.php:

'timestamp'  => $adapter instanceof AwsS3V3Adapter ? null : Storage::disk($disk)->lastModified($path),
'visibility' => $adapter instanceof AwsS3V3Adapter ? null : Storage::disk($disk)->getVisibility($path),

After page refreshing new folders are disappears.

In my case it's was permissions issue. Sorry)

rasouldanesh90 commented 7 months ago

The same issue with Laravel 10 and FTP disk. Fixed with commenting lines 137 and 138 in vendor/alexusmai/laravel-file-manager/src/Traits/ContentTrait.php:

'timestamp'  => $adapter instanceof AwsS3V3Adapter ? null : Storage::disk($disk)->lastModified($path),
'visibility' => $adapter instanceof AwsS3V3Adapter ? null : Storage::disk($disk)->getVisibility($path),

After page refreshing new folders are disappears.

In my case it's was permissions issue. Sorry)

@volosan

Hello, I also have the same problem / can you tell me how you got the access or where to get the access to increase the permissions? All folders have permission level 755 in my download host