Description

Read-only users are unable to collect var logs from Juniper device using the below command.

user@hostname> file archive compress source /var/log destination /var/tmp/filename

Symptoms

Error:

tar: Removing leading '/' from member names

tar: Can't open `/var/log/chassisd': Permission denied

tar: Can't open `/var/log/chassisd.0.gz': Permission denied

 

Solution

It requires root user or super-user permissions to execute below command in Juniper switch.

user@hostname> file archive compress source /var/log destination /var/tmp/filename

The above command won't work even though we configured custom login classes with specific privileges.

Modification History

2024-01-03: Article validated.
Updated the status from WIP to Non-Validated on July 14th,2023.