Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

linux

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

scp sampleweb.rar [email protected] /

It gave me this error under putty console .

cp: cannot create regular file `/sampleweb.rar': Permission denied
cp: cannot create regular file `/[email protected]': Permission denied
like image 647
user974802 Avatar asked Oct 11 '11 15:10

user974802


1 Answers

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, scp asssumes this is a local copy, and falls back to cp on the local machine, as indicated by your error messages.

like image 81
ire_and_curses Avatar answered Oct 29 '22 20:10

ire_and_curses