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
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
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/filenameThe above command won't work even though we configured custom login classes with specific privileges.