Linux SCP issue
-
Run this command manually, does it fail?
scp $i [email protected]:/
-
What error are you getting? You asked us if there was a problem but did not state what issue you were having.
-
@scottalanmiller The remote server is administered by a different company. I was told just a few minutes ago that they haven't asked... Told them to use rsync but haven't heard back yet.
-
What is the output of this command?
find /home/msftp/cdr -type f -ctime -1
-
@BBigford said:
@scottalanmiller The remote server is administered by a different company. I was told just a few minutes ago that they haven't asked...
Should not need to ask. If you have the right to log in as that user, you set up the key yourself. The other company likely has no control there. That would be unlikely.
-
@BBigford said:
@scottalanmiller The remote server is administered by a different company.
So the chances that you have access to write to / are nearly zero, then. That's probably your issue.
-
@scottalanmiller the admin says that the script will run, but simply doesn't copy. There's no error thrown (sorry that isn't more helpful). If he would get back to me already, I'd have him run those commands right now.
-
@BBigford said:
Told them to use rsync but haven't heard back yet.
Rsync is a good tool to use, of course, but unlikely to matter here.
-
Got it figured out. Turns out that the directory being called, didn't exist. All good now though, thanks for all the quick responses!
-
@BBigford said:
Got it figured out. Turns out that the directory being called, didn't exist. All good now though, thanks for all the quick responses!
It did exist, it's the filesystem root. The issue was that the user did not have permissions there I'm sure this was caused by accidentally forgetting the correct directory when making the script, but there is a director specified, it's just not one you would want to use
-
Had to finish some stuff at work and eat dinner with the wife and kiddo, but I was thinking about it. Once they set up a key you can do this with one line (if you don't use a key you would need the password for each file).
find /home/msftp/cdr -type f -ctime -1 -exec scp {} [email protected]:/whatever/folder \;
-
Yeah, you can get that to be pretty simple with a little work (and keys.)