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.
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
$ scp Test.zip linus@penisland.net:/path/to/dicks/Test.zip
linus@penisland.net's password:
scp: /path/to/dicks/Test.zip: Permission deniedHow 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