@atomcoder Use PHP’s native ftp_connect function and see if you can instantiate a connection with the credentials you’re given. If you can, they’re valid.
Mar 21, 2025
4
Level 3
FTP - Verify Credentials
Hi,
I'm trying to periodically verify that a configured FTP server within my filesystem is accessible and operational.
How can I test a FTP account to check if the credentials are correct and valid? (without uploading a file)
Level 33
Hi,
You can try to access the files Storage::disk('ftp')->files(). If it returns an array object (empty or full), it means the connection is successful. Otherwise, there is a problem. And maybe you have to control the 'throw' => true|false situation in your config file, when you try something like that.
1 like
Please or to participate in this conversation.