Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot access a folder using FTP

I´m currently working on a IC-3173 wit Linux RT. I installed all the FTP software on it as well, but I am having trouble with the FTP server. 

 

I am having trouble accessing some folders, specifically /usr/local/natinst/lib. There are some others it won´t open as well but that´s the main one I want to access. I can use WebDAV and SSH to access the folder, but when I try to open it using windows explorer I get an error stating "An error occurred opening that folder on the FTP server. Make sure you have permission to access the folder." Ive read that the FTP is not secure and not recommended and can only be accessed anonymously. I tried logging in (right click on folder "login as") for the sake of it, but if I do that it blocks all access.

 

I also thought it could be a permission thing in Linux so I chmod the /lib directory with 777 but still no luck. 

 

I have worked with a CVS-1458RT before and have used the FTP to access that same folder with no trouble at all. This is where I upload my .so files when working with OpenCV algorithms. 

 

I also turned off windows firewall but it didnt help either. Does anyone have any advice?

0 Kudos
Message 1 of 19
(16,099 Views)

I know that you mentioned that firewall is disabled, but can you confirm that the server ports specifically used for FTP are open? See more information here (skip to FTP section): http://www.ni.com/white-paper/12402/en/

I found a few tangentially related situations where this error also happened (one is using IE to place a file on the FTP server, the other is using a cFP-2220), and both times it was an issue with software and ended up having to upgrade. What version is your software you have installed on your computer/IC? 

What are the other folders that you are also not able to access? Do they throw the same error? Can you use WebDAV to transfer files to a different folder and programmatically retrieve those files? 

 

0 Kudos
Message 2 of 19
(16,034 Views)

I read the paper and opened ports 20,21 and 22 but it didn't solve it. I updated my explorer, used IE and filezilla and also didn't work. The IC has the latest software. I formatted the target and reinstalled but after that i was unable to use WebDAV to transfer files. 

However, I was able to deploy the binary straight from Eclipse to that specific folder so that would be a workaround for now. 

I can access the files programmatically. I made a small program just to measure file size of a file within the folder and it provides me with the correct size. (size of the binary file previously deployed with eclipse.)

0 Kudos
Message 3 of 19
(16,008 Views)

I'm actually having the same problem.  I have a cDAQ-9132 running RT Linux and have the FTP module installed.  I can navigate to the system by going to explorer and typing in the IP address.

 

ftp://192.168.129.1/home/

 

I wrote a VI that logs some temp data to the folder:

 

 ftp://192.168.129.1/home/lvuser/data/Temp%20Log/ 

 

After the VI is done running I get the following error from Explorer when I try to view the folder.

 

FTP Error.png

 

I've tried creating a new folder and logging to that, thinking the problem was with permissions on that folder, but that didn't work either.  I know there is data in this folder because I can see it with the Remote File Browser built into the web interface.

 

Using Filezilla I also get Connection closed by server when I try to view this folder.

0 Kudos
Message 4 of 19
(15,935 Views)

Was this something you got working in previous versions of LabVIEW that is now behaving differently? 

Additionally, some other users saw problems when they were trying to FTP in active mode. Have you tried passive mode? 

0 Kudos
Message 5 of 19
(15,923 Views)

I'm not sure at what point it started behaving this way, it may have been this way all along.  Several of these directories are just temporary holding places on the RT controller, which then get moved or organized into a place the host can access.  Some are also folders for debug logs to track memory usage, or state transitions.

 

I tried Filezilla with Passive and the connection was successful but I couldn't view some folders.  I then tried Active and a connection couldn't be made.  There is also an option for Default which seemed to have the same result as Passive where I could see most folders but not all.

 

FTP Error.png

0 Kudos
Message 6 of 19
(15,910 Views)

Hmm..focusing on the directory listing failed error, some solutions have been to configure filezilla to 1. use plain FTP and disable firewall, and 2. reconfigure the port ranges since directory listings are located on a different port than the default port 21 for passive mode.  

0 Kudos
Message 7 of 19
(15,897 Views)

Thanks for the reply but these suggestions aren't resolving my issue.  Keep in mind that I can connect, and I can list most directories.  I cannot however list the contents of a couple of them.  I did change my network type in Windows to be private (it was public before) which opens up many security settings.  I also made the changes suggested in Filezilla regarding active/passive modes, and plain text FTP.  But keep in mind for most directories the listing of its contents works just fine.  This tells me it is an issue with the controller itself and not an issue with my PCs settings.

 

I have also formatted the controller in MAX, recreated these folders in Windows Explorer, and then after executing a few tests (which write to these folders) it is then again inaccessible.  But in the Remote File Browser I can view and download files from these folders.  It really does seem that some folders can't be viewed in FTP and only in WebDav.  Even using WebDav I did have some issues with deleting files in these folders but that might be an unrelated issue.

0 Kudos
Message 8 of 19
(15,892 Views)

I tried on an VM and did a simple test to make sure I was able to see my files. Are you using sftp? Are all filters under Directory Listing Filters (in the "View" tab) disabled? (they should be by default, but just wanted to make sure). 

SR3060108.PNG

0 Kudos
Message 9 of 19
(15,872 Views)

Yes all filters are disabled, but even so remember I'm having the same issue when accessing these directories via Windows Explorer.  This is normal FTP (no port specified in Filezilla) and using the anonymous login.  Also notice that the directory I was trying to access was in a different path than the one you showed.  I had /home/lvuser/data/CAN Log not that I think that particular path is the issue, but rather likely something my LabVIEW program did to that directory.

0 Kudos
Message 10 of 19
(15,866 Views)