Linux 从一个系统复制到另一个系统时无法创建常规文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7728853/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 06:37:14  来源:igfitidea点击:

cannot create Regular file while copying from one system to another system

linux

提问by user974802

I tried to copy a file from one linux server to another Linux server using the below command

我尝试使用以下命令将文件从一台 Linux 服务器复制到另一台 Linux 服务器

scp sampleweb.rar [email protected] /

It gave me this error under putty console .

它在 putty console 下给了我这个错误。

cp: cannot create regular file `/sampleweb.rar': Permission denied
cp: cannot create regular file `/[email protected]': Permission denied

采纳答案by ire_and_curses

Assuming you are trying to write to the / directory on the remote machine, it looks like you are missing a colon:

假设您正在尝试写入远程机器上的 / 目录,看起来您缺少一个冒号:

scp sampleweb.rar [email protected]:/

Without the colon, scpasssumes this is a local copy, and falls back to cpon the local machine, as indicated by your error messages.

如果没有冒号,则scp假定这是一个本地副本,并返回到cp本地计算机上,如您的错误消息所示。