Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Write to Root Directory on cRIO

Solved!
Go to solution

I need to create a folder in the root directory of my cRIO but when I attempt to do so via the web interface (Silverlight) it gives me an Error 403 (Forbidden).  I can create and edit files and directorys in existing folders that reside in the root directory.

 

The vender was able to create a new folder in the root directory on our previous cRIO but now we are trying to set up another one on our own.  They told me that they didn't have to do anything special that they remember to create this folder.

 

Any ideas as to why I wouldn't be able to do this even though I have all permissions on the device?

0 Kudos
Message 1 of 5
(5,296 Views)
Solution
Accepted by NathanJD

It's confusing, but "all permissions" for the web interface is only "all permissions to things the web server has permissions to", which isn't everything. See http://digital.ni.com/public.nsf/allkb/4EBE45E8A816B19386257B6C0071D025 -- specifically this:


Write Access

(ETS, VxWorks) Your target provides write access to all its folders and files.

(NI Linux Real-Time) If you want to edit or create new folders and files on your target, you can do so only in the following directories:

  • /home/webserv
  • /home/lvuser
  • /tmp

Note: Your target deletes the content in the temporary folder /tmp on target restart.


Restricting access to the root directory makes the system more robust (prevents modification of important system files).

Message 2 of 5
(5,282 Views)

After looking at this document again, it does not seem to desribe my experience.  We are using a cRIO-9067 which is running NI Linux Real-time (based on this document).

 

The document to which you linked says that I shouldn't be able to write anywhere other than the listed directorys but I can write to any directory except the root. I created the file that I need in /c/config/.  That is strange.

 

 

 

 

0 Kudos
Message 3 of 5
(5,268 Views)

/c is also a special case and is permitted -- there's a link inside the doc I linked earlier, pointing to http://www.ni.com/tutorial/14669/en/ which has a lot more details. Short version, /c is preserved for legacy compatibility, but isn't a standard Linux path. I wouldn't recommend it, but it works as you discovered.

Message 4 of 5
(5,241 Views)

Sorry for digging the old topics.

 

In my cRIO 9053 i can create folder and files in /c/ or in /home/lvuser but i can't delete them anyway in webDAV or in mapped unit.

The only way to delete the folders is by SSH (https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kFakSAE&l=pt-PT), but when i want to do that in a Virtual Machine that group every cRIO i have in the field i can't do this and appear the following message "SSH is not a command recognized by the system".

 

Someone have a tip about how i can delete the old files in that cases?

André Simões
Work with LV2019 and cRIO since 2021
0 Kudos
Message 5 of 5
(1,844 Views)