LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

WebDAV: Access is forbidden to sbRIO/files/etc/.

Solved!
Go to solution

Hi All.

 

 

I'm using WebDAV to copy and replace an existing file to a NI Linux RT Target, the sbRIO-9607.

 

I'm trying to replace this file:

192.168.128.187\files\etc\myfile.conf

I'm using WebDAV Put File, but I receive an error: Client does not have access to the specified resource (access is forbidden). Error 363516

 

I have tried two different user accounts: The admin with blank password (default), and a new user with admin-rights, and a non-blank password. Same result.

 

How can I replace a file in this directory? Or at least edit it using LabVIEW?

The file needs to be placed in this directory, so it is not an option to place it an the user-folder, where the WebDAV Put File is working.

 

I can login to the target using SSH (using Putty), and edit the file using Nano, however, I want this progress to be automated, by a single click in a LabVIEW Host program.


Thanks,

 

Best Regards

Alex E. Munkhaus
Certified LabVIEW Developer (CLD)
System Engineer
0 Kudos
Message 1 of 8
(4,625 Views)

/etc/ is root access only. Can you instead create this file in /home/youruser/file.conf?

0 Kudos
Message 2 of 8
(4,582 Views)
Nope, as explained in previous post, I need the file to be palaced in /etc/.
Can I get root access to a user?
Best Regards

Alex E. Munkhaus
Certified LabVIEW Developer (CLD)
System Engineer
0 Kudos
Message 3 of 8
(4,577 Views)
Via sudo, yes. But unless your sudoers file allows your user to authenticate NOPASSWD, you'll have to type one. May I ask what it is you're trying to accomplish? What is the application and why does it need to modify something in /etc? Why doesn't it use an override, as commonly seen in things like .bashrc, .vimrc etc?
0 Kudos
Message 4 of 8
(4,572 Views)
Solution
Accepted by topic author A.E.M

FYI. This solves the issue:

 

chmod 646 nameOfFile.conf (while I was in the “/etc” directory).

 

I believe this should not be a safety issue, since I only allowed write access to that single file. If “an outsider” grants access and changes this file, he can’t really do any damage.

Best Regards

Alex E. Munkhaus
Certified LabVIEW Developer (CLD)
System Engineer
Message 5 of 8
(4,498 Views)

Hi!

 

May I ask which file I have to modify exactly ?

0 Kudos
Message 6 of 8
(1,728 Views)

@AMGZ01 wrote:

Hi!

 

May I ask which file I have to modify exactly ?


Maybe you would like to explain a little more what you are trying to do. From your question it appears that you seem to have some idea what you want to do, and somehow landed on this thread, but obviously didn't connect the dots between what is written here and what you want to do. This could be because you are not really trying to do what is described here.

 

In case it helps, the file you would make to modify is in this command:

 

 

chmod 646 nameOfFile.conf            (while I was in the “/etc” directory).

 

 

And the nameOfFile.conf is the file he wanted to change, obviously a placeholder for the real file he was trying to place there.

 

Changing access rights to files can be a severe security problem, so try to consult with someone who knows about how Linux works. Just because you CAN change access rights doesn't mean that you SHOULD! Depending on the file you change that way you could set your system open to anyone who gains some form of remote access to it. Especially files inside /etc are normally config files for all kind of Linux services which do specify among other things also often who can access that service and how much. So if it is for some service that has any power to change anything, that single changed access right is an easy foothold to totally comprise a system in several steps.

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 8
(1,719 Views)

Hi!

 

First, thank you for your answer and for your help. 

 

I have my RT target. When I deploy Labview projects directly, there is not problem. But, when I try to deploy from Veristand, apearse the same error:

 

• Start Date: 14/03/2022 11:12 p. m.
• Loading System Definition file: C:\Users\Public\Documents\National Instruments\NI VeriStand 2018\Projects\Example\Sinewave Delay.nivssdf
• Preparing to deploy the System Definition to the targets...
• Compiling the System Definition file...
• Initializing TCP subsystem...
• Starting TCP Loops...
• Connection established with target Controller.
• Sending reset command to all targets...
• Preparing to deploy files to the targets...
• Starting download for target Controller...
• Opening WebDAV session to IP 192.168.1.77...
• Processing Action on Deploy VIs...
• Gathering target dependency files...
• Downloading DAQPlugins.llb [543 kB] (file 1 of 😎
• Closing WebDAV session...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
The VeriStand Gateway encountered an error while deploying the System Definition file.

Details:
Error 363516 occurred at Project Window.lvlib:Project Window.vi >> Project Window.lvlib:Command Loop.vi >> Project Window.lvlib:Connect to System.vi

Possible reason(s):

LabVIEW: (Hex 0x58BFC) Client does not have access to the specified resource (access is forbidden).

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
• Stopping TCP loops.
Waiting for TCP loops to shut down...
• TCP loops shut down successfully.
• Unloading System Definition file...
• Connection with target Controller has been lost.

 

I navigate to the etc folder, but there is many .conf files, so I am not sure which one I have to modify or if this error is for another reason. 

 

Thank you! If you need more info, please tell me

0 Kudos
Message 8 of 8
(1,704 Views)