Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

catch an scp error?

Name: Anonymous 2012-03-13 12:46

When scp tries to overwrite an existing file (without group write) I get permission denied, otherwise it sends it or rewrites it.


$ scp Test.zip linus@penisland.net:/path/to/dicks/Test.zip
linus@penisland.net's password:
scp: /path/to/dicks/Test.zip: Permission denied


How do I catch that permission denied error (no group write) so my script can try sending it again with a different name?

Would it be easier to detect the permissions ahead of time and sudo chmod accordingly?

The scp'd file's permissions are preserved. When I $touch the permissions are -rw-rw-r--.

thanks

Name: Anonymous 2012-11-24 7:57

>>29
Well done, you can identify /prog/ in-jokes. Next lesson in becoming a true /prog/dolyte: using sage

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List