NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

File appears to exist but isn't there when opening

I have run across a confounding problem...

I have a 9033 running 2014. I used WebDAV to map the network drive in a Windows File Browser per instructions documented on NI.com. At first it appeared to work fine, but then started to say that the file didn't exist when I would try to open the file. The files in particular are either text files or PNG files. Usually a few F5s (refresh) of the folder would allow me to open the file. However it has progressed to the point where I would have to close and open the Windows file browser window to eventually allow me to access the file that was clearly listed.

I have now run into the case where my LabVIEW program is showing a File 8 error when running programmatically. Running the dev environment I can see the files exist but accessing them is a no-go.

I can open a terminal and using the command line I can browse to the folders and the files are indeed listed but I still can't access them.

Any one have any ideas?

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 1 of 8
(4,326 Views)

The error when accessing them could be a file permissions/owner issue. Can you post the output from running: ls -l <file_name> ? The long listing format from 'ls' will tell you who is the owner of the file and what read/write/execute permissions are set.

Not sure about the WebDAV refresh issues. Hopefully somebody else will chime in.

0 Kudos
Message 2 of 8
(3,254 Views)

The permission is set to -rw---------, as it has always been. Some files with that permission allow access and some don't. However it progressed to the point where none of them allowed access anymore. Coupled with the WebDAV issues makes me believe there is something bigger and connected. I have since reformated the controller and will try again.

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 3 of 8
(3,254 Views)

I'm not certain I correctly understand the problem and what you are trying to accomplish.

Are you having trouble using WebDAV to transfer files from the 9033 to a Windows machine?

Or, are you trying to open files located on the 9033 directly for viewing on the Windows machine?

Thanks for the clarification.

Tech Advisor - Automation
LabVIEW 5.0 - 2020
0 Kudos
Message 4 of 8
(3,254 Views)

It's not just the permissions that matter, but the also the owner user/group. For instance, a file owned by root that has only -rw-------- permissions, won't be accessible to user lvuser. Providing the output of ls -l <filename> would help solve your issue.

0 Kudos
Message 5 of 8
(3,254 Views)

I am having two issues (which I believe are related)

1. At first the Windows File Broswer using WebDAV (Instructions) worked perfectly to move files from Windows to the controller. I could also open and view files from the controller in Windows i.e. text files and PNGs. Slowly this ability went away. I could browse to the file but when I would try to open it would error and say that the file doesn't exist.

2. My labVIEW RT code would open/read files on the controller and preform analysis on the contents of said files. Slowly this ability went away. Randomly certain files would not open and would error out with Error 8. Eventually, just as with the WebDAV feature, all the files appeared to be there but "didn't exist" when trying to open.

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 6 of 8
(3,254 Views)

We might be on to something here,

Before formatting I looked at the files and they had the permissions of "-rw-------"

I have reformatted and reloaded all files from the archive and now the permissions are "-rw-rw-r--".

Is there some care that needs to be taken in Linux to retain this permission?

Post format and newly loaded raw data...

terminal ls.JPG

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 7 of 8
(3,254 Views)

I ran the code post format and all newly deployed data files and the code runs as expected. The output files look like this...

outputdata folder ls.JPG

I will watch the file permissions, but would I have to run a System Exec with the "chmod" command to set the permissions? I am not sure how to use standard LabVIEW file I/O VIs any differently to ensure proper permissions?!?!?! How would these change over multiple use and handling of files?

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 8 of 8
(3,254 Views)