Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

For non-root users, file copy utility tries to transfer jinstall packages to user's home directory even when the destination path is specified as /var/tmp

0

0

Article ID: KB27965 KB Last Updated: 27 Sep 2013Version: 1.0
Summary:
 For non-root users, file copy utility tries to transfer jinstall packages to user's home directory even when the destination path is specified as /var/tmp
Symptoms:
  For non-root users, file copy utility tries to transfer jinstall packages to user's home directory even when the destination path is specified as /var/tmp
Cause:
 
Solution:
Transferring a file such as a jinstall package as Super user login (not root) from a FTP server, or any other file transfer mode, to the /var/tmp folder of the switch will fail with "filesystem is full" message, and other errors (below).

This example uses the "file copy" command:

juniper@R5_console21> file copy ftp://test:juniper1@10.3.217.103/jinstall-ex-4200-11.4R4.5-domestic-signed.tgz /var/tmp
/var/home/juniper/...transferring.file........ 90% of 120 MB 4260 kBps 00m02s
/var: write failed, filesystem is full
/var/home/juniper/...transferring.file........ 92% of 120 MB 4277 kBps 00m02s
fetch: /var/home/juniper/...transferring.file.........XxE4vT/jinstall-ex-4200-11.4R4.5-domestic-signed.tgz: No space left on device
error: file-fetch failed
error: could not fetch local copy of file

{master:0}
juniper@R5_console21>


RESULT:
   - This is expected and this error will be seen for files that are larger than 100MB.  For files less than 100MB they will transfer fine as long as there is adequate space.


REASON:

A non-root user copying a file to the /var/tmp directory automatically attempts to save it to the /var/home/user directory instead, by design.  There is limited access to other directories when a non-root user.  The root cause for this behavior is even though we have specifically provided the path for the file as /var/tmp, it still gets saved in the /var/home/user location, and this has got a capacity of 100Mb.

Hence file transfer above 100MB would show up this error.


ROOT CAUSE:

This behavior is by design, as each file copy involves two operations.

1) To fetch the file from source and store it in home dir of the user
2) To put the file from home dir to the destination

The reason this is needed is to be able to achieve transfers in a general fashion, like when source is ftp server 1 and destination is ftp server 2. There is no way to do that in a single operation.


Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search