Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Rsync denied to copy

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
selPan
Posts: 6
Joined: 2016-10-07 13:45

Rsync denied to copy

#1 Post by selPan »

Hello I have 2 units mounted,
  • /mnt/A
and
  • /mnt/B
I want to use

Code: Select all

rsync
to do incremental backup from A to B without compress. If I enter in B with root I can create or delete or copy with no problem but when I run rsync it gives "denied 13". I already tried doing it on a new empty folder too. Anyone has idea of what could be wrong?

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Rsync denied to copy

#2 Post by GarryRicketson »

I can not guess, maybe show us exactly how you are writing the command,

Code: Select all

man rsync

has some good examples.

It should be something like this:

Code: Select all

 rsync -av /mnt/dir/files  /mnt/dir/files 
If it is usb devices, /media , might be better, in any event it would be some
thing like this:

Code: Select all

 rsync -av /media/sdc1/dir/ /media/sdb1/dir/
But I don't know how any body can guess at what you are doing wrong
with out seeing how you have written and typed the command, I can't,
but who knows maybe somebody else can.

For a wide range of examples, and lot's of details on 'rsync'
how to copy files from and to 2 mounted devices
Last edited by GarryRicketson on 2016-10-12 18:11, edited 1 time in total.

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Rsync denied to copy

#3 Post by dasein »

selPan wrote:when I run rsync it gives "denied 13".
And of course you already searched the Web for something insanely obvious like

Code: Select all

rsync "denied 13"
Oh no, wait, you didn't, because if you had, you would have found over 5,000 hits that would both explain that this is a permissions problem and tell you how to fix it.

Or did you want/expect to have the solution typed out especially for you?

http://forums.debian.net/viewtopic.php?f=30&t=47078

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Rsync denied to copy

#4 Post by GarryRicketson »

Oops, I am sorry, I didn't think to search using the keywords:

Code: Select all

 rsync "denied 13" 
It could be a permisson issue, or also if the path is not correct,
or something in the command syntax,.....which is why we need to see
exactly how the OP wrote the command.
First hit :
http://unix.stackexchange.com/questions ... -as-a-root

This may not apply, but it is a excellent example of the correct way to
ask, and get a good answer, in the above link the OP posts the command syntax they
used, and get's a prompt , clear answer.

selPan
Posts: 6
Joined: 2016-10-07 13:45

Re: Rsync denied to copy

#5 Post by selPan »

GarryRicketson wrote:I can not guess, maybe show us exactly how you are writing the command,

Code: Select all

man rsync

has some good examples.

It should be something like this:

Code: Select all

 rsync -av /mnt/dir/files  /mnt/dir/files 
If it is usb devices, /media , might be better, in any event it would be some
thing like this:

Code: Select all

 rsync -av /media/sdc1/dir/ /media/sdb1/dir/
But I don't know how any body can guess at what you are doing wrong
with out seeing how you have written and typed the command, I can't,
but who knows maybe somebody else can.

For a wide range of examples, and lot's of details on 'rsync'
how to copy files from and to 2 mounted devices
This is my line

Code: Select all

rsync -raptgov /mnt/folder/ /mnt/folder2/folder/
Seems it has some problems when It try to keep the user and group. But with option av having the same

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Rsync denied to copy

#6 Post by GarryRicketson »

I don't know, I don't understand why you are trying to do that way.
Here is another example.

Code: Select all

 # rsync -av /mnt/one/ /mnt/two/
sending incremental file list
./
one.txt

sent 116 bytes  received 34 bytes  300.00 bytes/sec
total size is 28  speedup is 0.19
root@debian:/# cd /mnt
root@debian:/mnt# ls
one  two
root@debian:/mnt# cd two
root@debian:/mnt/two# ls
one.txt
root@debian:/mnt/two# 
 
You need to be root to mount anything. Also even if you are root, the folder and file
must have read write permissions.
Last edited by GarryRicketson on 2016-10-13 18:05, edited 1 time in total.

selPan
Posts: 6
Joined: 2016-10-07 13:45

Re: Rsync denied to copy

#7 Post by selPan »

GarryRicketson wrote:I don't know, I don't understand why you are trying to do that way.
Here is another example.

Code: Select all

 # rsync -av /mnt/one/ /mnt/two/
sending incremental file list
./
one.txt

sent 116 bytes  received 34 bytes  300.00 bytes/sec
total size is 28  speedup is 0.19
root@debian:/# cd /mnt
root@debian:/mnt# ls
one  two
root@debian:/mnt# cd two
root@debian:/mnt/two# ls
one.txt
root@debian:/mnt/two# 
 
You need to be root to mount anything. Also even if you are root, the folder and file
must have read write permissions.
I am trying to do an incremental backup from a folder to another, those 2 folders and a network storage. The backup can not be in compress mode.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Rsync denied to copy

#8 Post by GarryRicketson »

There is a lot of details not clear, to start with, What are these "folders", ?
I don't have those on any of my systems, I use directories, I think, but
am not sure, when people say "folders" they are refering to directories.
Usually one does not need to even use mount, to copy files from one directory
to another,
and a network storage.
What is the "network storgage", ?
I think maybe if you can show what you have in your "mount" dir,...it might help
example:

Code: Select all

/$ cd mnt
garry@debian:/mnt$ ls
garry@debian:/mnt$ 
 
In this case mine is empty, nothing mounted.
==========================
First I make 2 directories, for the devices,
In this example , I have 2 devs mounted:

Code: Select all

/# umount /dev/sda1
root@debian:/# mkdir /mnt/sda1
root@debian:/# mkdir /mnt/sda3
root@debian:/# mount /dev/sda3 /mnt/sda3/
root@debian:/# mount /dev/sda1 /mnt/sda1/
root@debian:/# cd /mnt
root@debian:/mnt# ls
sda1  sda3
  
Here is some more example,
First I make 2 directories, for the devices,
:

Code: Select all

 mkdir /mnt/sda1
  mkdir /mnt/sda3
  mount /dev/sda3 /mnt/sda3/
  mount /dev/sda1 /mnt/sda1/
 

Then

Code: Select all

cd /mnt 
to check and see if they are mounted properaly:

Code: Select all

garry@debian:/mnt$ ls
sda1  sda3
 
They are.
I am going to copy the FDOS dir and all the files in it, using rsync,
so :

Code: Select all

 rsync -av /mnt/sda1/FDOS  /mnt/sda3/home/FDOS  
As far as using these options goes :

Code: Select all

rsync -raptgov  
I don't think it matters much, it should still work the same,...
The part I am finding confusing is:
/mnt/folder/ /mnt/folder2/folder/
These "folder" things, and you do not show any devices, or partions mounted,
,...also you don't show wnat the output was or is, if there is any error message,
I am sure there was one.
Are you using Debian ?

selPan
Posts: 6
Joined: 2016-10-07 13:45

Re: Rsync denied to copy

#9 Post by selPan »

GarryRicketson wrote:There is a lot of details not clear, to start with, What are these "folders", ?
I don't have those on any of my systems, I use directories, I think, but
am not sure, when people say "folders" they are refering to directories.
Usually one does not need to even use mount, to copy files from one directory
to another,
and a network storage.
What is the "network storgage", ?
I think maybe if you can show what you have in your "mount" dir,...it might help
example:

Code: Select all

/$ cd mnt
garry@debian:/mnt$ ls
garry@debian:/mnt$ 
 
In this case mine is empty, nothing mounted.
==========================
First I make 2 directories, for the devices,
In this example , I have 2 devs mounted:

Code: Select all

/# umount /dev/sda1
root@debian:/# mkdir /mnt/sda1
root@debian:/# mkdir /mnt/sda3
root@debian:/# mount /dev/sda3 /mnt/sda3/
root@debian:/# mount /dev/sda1 /mnt/sda1/
root@debian:/# cd /mnt
root@debian:/mnt# ls
sda1  sda3
  
Here is some more example,
First I make 2 directories, for the devices,
:

Code: Select all

 mkdir /mnt/sda1
  mkdir /mnt/sda3
  mount /dev/sda3 /mnt/sda3/
  mount /dev/sda1 /mnt/sda1/
 

Then

Code: Select all

cd /mnt 
to check and see if they are mounted properaly:

Code: Select all

garry@debian:/mnt$ ls
sda1  sda3
 
They are.
I am going to copy the FDOS dir and all the files in it, using rsync,
so :

Code: Select all

 rsync -av /mnt/sda1/FDOS  /mnt/sda3/home/FDOS  
As far as using these options goes :

Code: Select all

rsync -raptgov  
I don't think it matters much, it should still work the same,...
The part I am finding confusing is:
/mnt/folder/ /mnt/folder2/folder/
These "folder" things, and you do not show any devices, or partions mounted,
,...also you don't show wnat the output was or is, if there is any error message,
I am sure there was one.
Are you using Debian ?
You make me laugh a lot folk. The problem seems to be solved by adding "no owner" option but I will let you know tomorrow if it worked fine when the backup finish. Thanks for trying to help.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Rsync denied to copy

#10 Post by GarryRicketson »

No need to "full quote" the entire post. when replying, that is silly.
Thanks for trying to help.
Well, your welcome, we try, but it is hard when people don't like to
do searches, and try to figure things out on their own,
We did suggest you check the permissions, I assumed you
would logically also think to check the owner as well,
so any way glad to see you finally figured it out,

That is why I suggested to read the manual

Code: Select all

man rsync
--no-OPTION
You may turn off one or more implied options by prefixing the option name with "no-". Not
all options may be prefixed with a "no-": only options that are implied by other options
(e.g. --no-D, --no-perms) or have different defaults in various circumstances (e.g.
--no-whole-file, --no-blocking-io, --no-dirs). You may specify either the short or the long
option name after the "no-" prefix (e.g. --no-R is the same as --no-relative).

For example: if you want to use -a (--archive) but don’t want -o (--owner), instead of con‐
verting -a into -rlptgD, you could specify -a --no-o (or -a --no-owner).
--------------- edit ----------
Some additional humor,.... honestly , the term "folders" does confuse me,
For me "folders" are something I keep in the file cabinate, with papers,..
So any way, I did a search, to see what I could find out, and apparently
"folders" are the same as directories,
http://goinglinux.com/articles/DirectoryVsFolder.html
The term "folder" is immediate understood by users who have only ever used modern Mac or Windows computers, and have never been exposed to the original term "directory."
I apologize, I have never used either one Windows, or Mac, so please forgive my ignorance.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Rsync denied to copy

#11 Post by Head_on_a_Stick »

GarryRicketson wrote:Some additional humor,.... honestly , the term "folders" does confuse me,
For me "folders" are something I keep in the file cabinate, with papers,..
So any way, I did a search, to see what I could find out, and apparently
"folders" are the same as directories,
http://goinglinux.com/articles/DirectoryVsFolder.html
The term "folder" is immediate understood by users who have only ever used modern Mac or Windows computers, and have never been exposed to the original term "directory."
I apologize, I have never used either one Windows, or Mac, so please forgive my ignorance.
Ha! I always use the term "folders" :D

The really weird thing is that the command to view the folder contents in a Windows "terminal" is

Code: Select all

dir
:?

Even weirder, this also works in GNU/Linux...

https://www.gnu.org/software/coreutils/ ... ation.html
deadbang

Post Reply