Solution
In LabVIEW Real-Time 2013 and later, the
umount
and
mount
commands have a setuid bit that is not underneath all users.
lvuser
is the default user when deploying the System Exec VI and this does not have access to these commands. For most targets, it is unnecessary to use this eject option.
If you would still like to provide lvuser with the permissions necessary to call
umount
and
mount
, you can do the following (which assumes familiarity with using a tool like vi to edit files in Linux):
- Log into the cRIO using PuTTY or some other SSH tool.
- Use vi at the command line to open
/etc/fstab
to be edited. - Insert a new line below the last line that begins with "tmpfs".
- Add the line, "
/dev/sda1 /media/sda1 auto users 0 0
" - Confirm that the formatting of the newly-added line matches the image below.
- Save the file and reboot the target.
NOTE: sda1 is the default identifier for the device, but if there are multiple external devices, the identifier may be different.
Another way to incorporate the functionality is by flushing the data programmatically and properly closing all file references to the removable media in LabVIEW before ejecting the device.