1

I'm trying to copy a 4.5GB file to my Raspberry Pi:

scp -r ~/firmware/ pi@192.168.2.8:/opt/
pi@192.168.2.8's password:
scp: /opt//firmware/.DS_Store: Permission denied
scp: /opt//firmware/.git: Permission denied
scp: /opt//firmware/boot: Permission denied
scp: /opt//firmware/documentation: Permission denied
scp: /opt//firmware/extra: Permission denied
scp: /opt//firmware/hardfp: Permission denied
scp: /opt//firmware/modules: Permission denied
scp: /opt//firmware/opt: Permission denied
scp: /opt//firmware/README: Permission denied
2

Default permissions for directory /opt/ is 755 and owned by root and group root, which makes it not possible for your user (pi) to write to this location.

You'll have to ssh in to the server and change the permssions on /opt/ or you can scp over the 4.5GB file to your home location ($HOME) and then use mv with sudo.

  • Better create a subdirectory under /opt and then move things around...changing opt permissions for good is not the best of the ideas. – Rui F Ribeiro Nov 24 '15 at 7:40
  • @RuiFRibeiro I totally agree with you, but now if this guy really wants to be able to scp over to /opt directly he'll have to change the perms. – krt Nov 24 '15 at 7:46
0

check the permission on target machine for the user pi .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.