scp error: not a regular file
8,562
You are missing the -r
option that is required to copy a directory and its contents.
From man scp:
-r Recursively copy entire directories.
So your command would be:
sudo scp -r /run/media/orcacomputers/DataCabinet/fileBackups/centos6-root/etc/httpd/conf.d/ root@ip:/etc/httpd/conf.d
Related videos on Youtube
![Powerhouse6666](https://i.stack.imgur.com/UmFiM.png?s=256&g=1)
Author by
Powerhouse6666
Renaissance man polymath Areas of expertise: Auditing, Computer Science, Mixed Martial Arts.
Updated on September 18, 2022Comments
-
Powerhouse6666 almost 2 years
I am trying to copy a directory from my local machine to a remote machine.
Here is the command I am using;
sudo scp /run/media/orcacomputers/DataCabinet/fileBackups/centos6-root/etc/httpd/conf.d/ :root@ip/etc/httpd/conf.d
What am I doing wrong here?
-
Powerhouse6666 over 5 yearscommand not found
-
n8te over 5 yearsWhich command is it saying is not found?
-
Powerhouse6666 over 5 yearssudo: /run/media/orcacomputers/DataCabinet/fileBackups/centos6-root/etc/httpd/conf.d/: command not found [orcacomputers@orcainbox conf.d]$ sudo -r scp /run/media/orcacomputers/DataCabinet/fileBackups/centos6-root/etc/httpd/conf.d/ [email protected]:/etc/httpd/conf.d
-
n8te over 5 yearsYou wrote
sudo -r scp
but it should besudo scp -r
-
n8te over 5 yearsThat's a whole new problem now. Run it one more time with the additional -v option to see if it gives you more of a clue where it's getting tripped up. Run
sudo scp -rv /run/media/orcacomputers/DataCabinet/fileBackups/centos6-root/etc/httpd/conf.d/
-
Powerhouse6666 over 5 yearsthanks! here is the paste bin pastebin.com/p1XtPR9W
-
n8te over 5 yearsThere are a number of possible causes to what you're seeing but this is wandering too far off from the original problem: the missing
-r
option that was preventing a directory from being copied. I would encourage you to start a new post with all the details necessary to troubleshoot this new authentication issue you're seeing. It's too complex to go back and forth here in the comments on this post. -
Powerhouse6666 over 5 yearsOkay great, thank you for the clarification. 10-4 Powerhouse 0ut
-
Community over 2 yearsYour answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.