Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get fdisk to work in Linux RTOS

Let's say you want to see if a USB disk is attached. Perhaps the most reliable Linux command to do this is

 

fdisk -l | grep "Disk /dev/sd"

But this won't work inside a LabVIEW RT application. Why not? Because the lvuser does not have sufficient permissions to execute the fdisk command. The "disk" group has sufficient permissions to execute this command. 

 

Here's the solution I discovered:

  1. SSH into the RT system using putty (or whatever).
  2. Execute the command 
    gpasswd -a lvuser disk
  3. Reboot.

That should do it!

Message 1 of 1
(2,147 Views)