Cannot Modify Files on an NI Linux Real-Time Target with Web Interface

Updated Mar 15, 2019

Reported In

Software

  • LabVIEW Real-Time Module
  • LabVIEW

Operating System

  • NI Linux Real-Time

Issue Details

I have an application that produces and stores multiple files on a cRIO. When using the cRIO Web Interface, I am unable to delete/modify/rename files created by the application. How do I fix this?

Solution

To to able to modify files on the cRIO through the web interface, we'll have to change permission settings in the folders where the files are stored.
  1. Connect to the cRIO's shell by following the steps on Accessing the Shell on NI Linux Real-Time Devices.
  2. Issue a chmod g+rwx [location] command, where [location] is the directory where the files are stored.

Additional Information

Since Linux is a multi-user operating system, multiple users can interact with the system at the same time. It is common practice in Linux to start different processes with their own reduced user rights. This means that each process (or group of similarly acting processes) has its own user.

LabVIEW processes are run as the user lvuser while Web Interface processes are run as the user webuser. Since webuser by default does not have permission to access files by lvuser, you are unable to access those files.

By issuing an appropriate chmod command, we give all users in the same group as the owner Read-Write-Execute permissions for that location. Both lvuser and webuser are grouped together in the group ni, so webuser will now have access to the files in that location.

If you need to make more specific access control rules, review the Access Control section in the NI Linux Real-Time Security User Guide  for reference.

WAS THIS ARTICLE HELPFUL?

Not Helpful