Switching

 View Only
last person joined: 3 days ago 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  Install Software from ftp as "non root"

    Posted 06-08-2017 05:59

    Hi Community,

     

    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?



  • 2.  RE: Install Software from ftp as "non root"

    Posted 06-09-2017 04:03

    drop to the shell and and cd /var/tmp

    then get the file,



  • 3.  RE: Install Software from ftp as "non root"

     
    Posted 06-09-2017 06:28

    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.



  • 4.  RE: Install Software from ftp as "non root"

    Posted 06-14-2017 03:12

    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 😞

     



  • 5.  RE: Install Software from ftp as "non root"

    Posted 06-14-2017 11:33

    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.



  • 6.  RE: Install Software from ftp as "non root"
    Best Answer

     
    Posted 06-14-2017 19:42

    Hi Folks,
    I hope the below trick will solve your problem,

    set cli directory /var/tmp <<<

     

    Then do ftp from the same sesion

     

    Initial:

    lab> file list
    /var/home/lab/:


    Commands Added:
    set cli directory /var/tmp

     

    Now the Magic:

    lab> file list
    /var/tmp/:



  • 7.  RE: Install Software from ftp as "non root"

    Posted 07-31-2017 00:00

    Hi Python,

     

    thanks - that did the trick 🙂 🙂 🙂