Not able to browse FTP folders

Hello cookies,

I have been trying to setup an FTP with ownCloud, so that I can browse files and folders from an FTP location in my owncloud. I have enabled the FTP plugin files_external_ftp. I have setup an FTP server using FileZilla on my Mac. The FTP server is configured to allow Passive mode and is setup as FTP over TLS with a default certificate generated by FileZilla.

  • When I connect to FTP server using FileZilla FTP client. I can browse all files.
  • When I connect to FTP server using FTP command from a terminal from owncloud server, I can browse all files.
  • When I configure FTP server under the storage settings using the FTP username/password, root location - it shows the green dot meaning its able to establish the connection. The FTP server console also confirms the connection. A new folder starts to show up in the owncloud Files interface as well. However, when I click on it, it does not show anything. It does not give any error on owncloud interface. I looked at the FTP console and I can see that owncloud issued a command to browse the FTP folder but it failed. Below are the log entry form FTP Server console.

Info [Type] Message
<Wed Sep 14 08:12:18 2022> FTP Session 52 192.168.64.3 user [Command] TYPE A
<Wed Sep 14 08:12:18 2022> FTP Session 52 192.168.64.3 user [Response] 200 Type set to A
<Wed Sep 14 08:12:18 2022> FTP Session 52 192.168.64.3 user [Command] LIST -lna Work
<Wed Sep 14 08:12:18 2022> FTP Session 52 192.168.64.3 user [Response] 550 Couldn’t open the file or directory
<Wed Sep 14 08:12:18 2022> FTP Session 52 192.168.64.3 user [Command] QUIT
<Wed Sep 14 08:12:18 2022> FTP Session 52 192.168.64.3 user [Response] 221 Goodbye.
<Wed Sep 14 08:12:18 2022> FTP Server [Status] Session 52 ended gracefully.

I thought may be there is some security issue because of certificate. I tried unchecking the FTPS checkbox in owncloud storage configuration. It shows the same green dot confirming the connection and FTP server console also confirms the connection. But when it comes to browsing the files, it shows the same 550 error after LIST -lna Work command. Work is the FTP folder which is very much there.

Then I tried to setup FileZilla FTP server on a Windows machine and opened up ftp and passive ports on firewall. Same behaviour, where the connection shows success but browse files show exact same error and no content comes up.

I have already spend a number of hours to fix this. Has anyone been able to successfully setup FTP storage. Any guidance will help.

Thanks

According to my experience, you cannot use the ftp root folder. Try to create and use a subfolder, like /ocfiles for example. This works for me.

I have tried that as well but it still doesn’t show anything, and I see this in FTP server console.

2022-09-15T10:57:06.197Z >> [FTP Session 9 192.168.64.3 user] TYPE A

2022-09-15T10:57:06.197Z << [FTP Session 9 192.168.64.3 user] 200 Type set to A

2022-09-15T10:57:06.197Z >> [FTP Session 9 192.168.64.3 user] LIST -lna Work/Atom

2022-09-15T10:57:06.197Z << [FTP Session 9 192.168.64.3 user] 550 Couldn’t open the file or directory

2022-09-15T10:57:06.202Z >> [FTP Session 9 192.168.64.3 user] QUIT

Did you ever check your owncloud.log?

Well, there was nothing useful there.

However, on other note, I have now tried to do the same config on Nextcloud and it worked like charm. FTP log shows that Nextcloud is not passing LIST -lna command. Its using MDTM and MLSD and able to browse the FTP folders straight away.

2022-09-15T12:19:17.727Z << [FTP Session 300 192.168.64.2 user] 230 Login successful.

2022-09-15T12:19:17.727Z >> [FTP Session 300 192.168.64.2 user] PASV

2022-09-15T12:19:17.727Z << [FTP Session 300 192.168.64.2 user] 227 Entering Passive Mode (192,168,64,1,244,148)

2022-09-15T12:19:17.728Z >> [FTP Session 300 192.168.64.2 user] MDTM //Work

2022-09-15T12:19:17.728Z << [FTP Session 300 192.168.64.2 user] 213 20220915115239

2022-09-15T12:19:17.730Z >> [FTP Session 300 192.168.64.2 user] TYPE A

2022-09-15T12:19:17.730Z << [FTP Session 300 192.168.64.2 user] 200 Type set to A

2022-09-15T12:19:17.730Z >> [FTP Session 300 192.168.64.2 user] MLSD //Work

2022-09-15T12:19:17.731Z << [FTP Session 300 192.168.64.2 user] 150 Starting data transfer.

2022-09-15T12:19:17.731Z << [FTP Session 300 192.168.64.2 user] 226 Operation successful

2022-09-15T12:19:17.755Z >> [FTP Session 300 192.168.64.2 user] QUIT

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