permission denied while trying to copy files from local server to remote server in ubuntu
Your command is correct, but I expect you are trying to copy the files to the wrong location. Have you tried copying the files to your home
directory?
rsync -v -e ssh /home/tanveer/myfilename username@server:~
You can also shorten your command by leaving out the -e ssh
which is normally set by default. You might also want to preserve the copied files' properties -a
, copy symlinks as symlinks -l
and limit your copying to a single partition -x
:
rsync -valx /home/tanveer/myfilename username@server:~
One thing to look out for when using rsync
is the effect of adding a trailing /
to a source directory. Without a trailing /
the directory will be copied as a directory, with the trailing /
only its contents will be copied.
rsync weird behaviour
Ok, I just figured it out.
Someone (because we work together as a team) had done a change on the "final folder" so that "apache" user's group can't execute (so can't traverse) the folder itself.
In that way, although it is possibile for "other group" to execute, the sum of permits that we receive (we were into "apache" group) isn't enough for "execute" the folder and retrive the file.
We just change that scenario and now it works properly!
Related Topics
Explicitly Invoke Sig_Dfl/Sig_Ign Handlers on Linux
Deleting String Up to the First Occurrence of Certain Character
Command Substitution Within Sed Expression
How to Tell Qt to Use Different Openssl
Sed Returns "Sed: Command Garbled"
How to Parse Command Line Options in Bash Shell
Why Do My Results Different Following Along the Tiny Asm Example
Shell Script for Multithreading a Process
Emulating Slurm on Ubuntu 16.04
How to Not Transfer Changes Done to Files from a Branch to a Another in Git
Difference Between Gnuwin32 and Cygwin
Writing to Eventfd from Kernel Module
Cmake Complains "The Cxx Compiler Identification Is Unknown"
Can't Find Out Where Does a Node.Js App Running and Can't Kill It