LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO File Locations

I'm working on a cRIO project and keep running into an issue with file permissions. I guess there's probably some cRIO linux best practice that I'm missing for file locations. The application is straight forward, initialize data acquisition from a config file, record data and write it to a location on the cRIO, an application on a Host PC retrieves the datafiles using WebDAV and deletes them on success.

The problem is, no matter where I locate the configuration file or the datafiles I'm running into file permissions when trying to modify the configuration or delete the datafiles. The WebDAV error is 363510 when trying to delete the files. I can retrieve them just fine. I've tried locating these files in a subfolder of where the RTEXE is, I tried a subfolder under "/tmp", I've tried everywhere. All of them same result. The weird part is I can't even delete them through a windows explorer window or the web-based FTP/WebDAV interface. I can SSH into the RIO and chmod the folder and that is successful, but after I do that once, the next time I write files there I'm in the same situation, I haven't found a chmod command that allows me to delete files within a folder for all future files in that folder. The really weird part is this was working before and now I can't figure out why it's not anymore. I've tried using admin login with no password, admin with password, other user with admin rights with password, all with the same error. 

I also get errors when attempting to modify or overwrite the config file that's located in a subfolder of the RTEXE. I can successfully chmod that file, and I guess that's sort of okay, but feels wrong. 

So my question is, is there some best practice for cRIO Linux file locations, both for temporary data and permanent or semi-permanent configuration files? 

0 Kudos
Message 1 of 4
(4,017 Views)

Barring any 'odd' corrupt configuration issues with your cRIO OS setup. BTY: Just try the vanilla 'everything' OS install option of your cRIO when you're first trying things out - solving problems.

 

You can place directories and files on the c:\ of the cRIO. When you deploy/run the code on the cRIO chassis, then the c:\ is the drive within the cRIO. Write a VI that does a 'Check Drive C:\" and run it on the cRIO - you don't even need to deploy it..Then add creating a directory, etc. until you get it all working.

 

I would stay out of the LinuxOS directory structure entirely on the cRIO, there is no need to go there.

 

You can also FTP files and create directories on the cRIO from Max - this is a good way to check things out at a basic level.

 

WebDav: The problems there *could* be you need to setup an access UN & PW for the cRIO to allow full support of Webdav. This might explain why you can't perform some write operations via WebDav.

 

Regards

Jack Hamilton

0 Kudos
Message 2 of 4
(3,988 Views)

So I switched everything to use /C/ as a base. Now when it writes datafiles it writes them to /files/C/team/datafiles/webdav/. When I go to retrieve them I can pull the files over WebDAV just fine but attempting to delete them still yields error 363516. 

0 Kudos
Message 3 of 4
(3,963 Views)

Some progress, take a look at this with regards to the WebDAV error:

https://forums.ni.com/t5/LabVIEW/WebDAV-Access-is-forbidden-to-sbRIO-files-etc/td-p/3288448

0 Kudos
Message 4 of 4
(3,951 Views)