Description

This article provides a work-around and fix for accessing /var/public on an NFX150 from a non-root user.

Symptoms

To load a VNF image on the device from a remote location, the file-copy command is used. Alternatively, the netconf command file-put can be used to load a VNF image.
Note: The VNF image must be in the /var/public directory.

Because the device is at a remote location, the admin logs into their NFX150 running version 18.1R1 with the super-user account:
set system login user ops uid 2000
set system login user ops class super-user

However, when attempting to copy the VNF image to /var/public , the following errors are reported:

ops@nfx150_s1> file copy https://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img /var/public/cirros-0.4.0-x86_64-disk.img
/var/home/ops/...transferring.file.........MHK100% of   12 MB  405 kBps 00m00s
cp: /var/public/cirros-0.4.0-x86_64-disk.img: Permission denied
error: put-file failed
error: could not send local copy of file

The super-user has no permission to /var/public :

ops@nfx150_s1> file make-directory /var/public/tmp
mkdir: /var/public/tmp: Permission denied

This is also shown here:

% cd /var
% ls -la | grep public
lrwxr-xr-x   1 root  wheel      18 Jun  7 10:29 public -> /var/lshare/public

It is not desirable to enable root logins remotely, and when using tools such as Sky Enterprise, non-root accounts are required to be able to create VNFs/copy images to the NFX.

This was not the case on NFX250, but it is failing on the NFX150 because /var/public is only accessible by root .

Solution

Work-around: 
The work-around for this issue to: chmod 775 /var/public

Fix: 
The ability to access /var/public with a non-root user has been fixed in the releases indicated in PR1333995 .