we want a user to be able to install JunOS Updated via ftp.
However when copying the files from ftp to /var/tmp/ the Switch stores the image in the /home/user folder before copying it to /var/tmp - resulting in the home-directory being too small...
When using the copy as root-user the file is sent directly to /var/tmp/.
Is it possible to change the behavior of the Switch so that it puts the file straight to /var/tmp without storing it in /home/user first?
drop to the shell and and cd /var/tmp
then get the file,
I believe he is saying his issue is that since the 1st copy (for non-root user) is to /home/user there is not enough room in this directory for him to get the file into /tmp/var. He is looking for some method (I do not know!) for non-root user to copy file directly to /tmp/var folder.
Exactly. Even if I go to the shell and cd to /var/tmp It still copies to /home/user before moving this internally to /var/tmp
Only root is able to move directly to /var/tmp it seems 😞
Home dir is set in /etc/passwd. You can modify the file and change the home directory temporarilly. But then you may need root permissions to do so, Ihave not checked it. But I suspect that what you want to do is to find a way around the built in security without using an account that is required and if that were to be the case, the device would not be secure security device. So that may require some advance hacking skills to elevate to permissions of your logged user account. Not sure how to accomplish that. If you could make that change then log in a second session, it should use the new home directory. However, would it not be easier to simply inform the person with root permissions, to update the device since this is not a command you will be using daily, instead of trying to bypass the security?You could also try another method I have used. Download the file, then use a gui ftp program like fireftp to connect to the EX, and copy the file to the directory you want it. You may still run into a problem with disk space when you run the installation command. Sorry.
Hi Folks,I hope the below trick will solve your problem,
set cli directory /var/tmp <<<
Then do ftp from the same sesion
lab> file list/var/home/lab/:
Commands Added:set cli directory /var/tmp
Now the Magic:
lab> file list/var/tmp/:
thanks - that did the trick 🙂 🙂 🙂