Thursday, July 5, 2018

HP ProCurve, SCP failing due to permission denied

Hi!

I'm trying to copy over a file from my local client towards a HP switch but keeps failing due to permissions.

Downloads $ scp -v candidate.conf username@device.domain.com:/cfg/candidate.conf !--> Output removed debug1: Authentications that can continue: password,keyboard-interactive debug1: Next authentication method: keyboard-interactive username@172.16.0.10's password: debug1: Authentication succeeded (keyboard-interactive). Authenticated to device.domain.com ([172.16.0.10]:22). debug1: channel 0: new [client-session] debug1: Entering interactive session. debug1: pledge: network debug1: Sending environment. debug1: Sending env LC_CTYPE = UTF-8 debug1: Sending command: scp -v -t /cfg/candidate.conf Sending file modes: C0606 3557 candidate.conf scp: /cfg/candidate.conf: Permission denied !--> Output removed 

When I log in trough sftp to get into the underlying OS (not HP ProVision?) I can clearly see the permissions.

sftp> ls -l drwxr-xr-x 2 J9854A J9854A 0 Jan 01 00:01 cfg drwxr-xr-x 2 J9854A J9854A 0 Jan 01 00:01 core drwxr-xr-x 2 J9854A J9854A 0 Jan 01 00:01 log drwxrwxrwx 2 J9854A J9854A 0 Jan 01 00:01 os drwxrwxrwx 3 J9854A J9854A 0 Jan 01 00:01 ssh drwxrwxrwx 2 J9854A J9854A 0 Jan 01 00:01 tr69 ?rwxrw-r-- 1 J9854A J9854A 149 Jan 01 06:05 tr69_log ?rwxrw-r-- 1 J9854A J9854A 0 Jan 01 00:01 tr69_status 

I've tried to create a manager user J9854A but without success. There's even a possibility to change permissions, but nothing happens after command is executed.

sftp> chmod 777 cfg Changing mode on /cfg sftp> ls -l drwxr-xr-x 2 J9854A J9854A 0 Jan 01 00:01 cfg 

Note! I can copy from the device!

scp username@device.domain.com:/cfg/running-config running.config !--> Output removed running-config 100% 3557 171.3KB/s 00:00 Connection to device.domain.com closed by remote host. 

Has anyone managed to transfer a file to a HP ProCurve switch in the way I'm doing trough SCP? (SFTP fails in the same way)

I suppose a last resort would be to SSH into the switch and copy the candidate configuration from a remote SFTP. But I'd like to see if a simple SCP can be used as it's less greasy when I'm scripting it.

Any help is greatly appreciated! :)

// David



No comments:

Post a Comment