LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-08-2010, 07:19 AM   #1
replica88
Member
 
Registered: Nov 2009
Posts: 48

Rep: Reputation: 16
what is the rsync flag to ignore permissions


I am using Rsync to backup files to a another machine, the users on my fileserver do not exist on the backup server so Rsync throws errors about the permissions. It copies the files fine but I want to get rid of the errors and have Rsync ignore the permissions when backing up.

/backup is a mounted ftp directory

Below is the current command and output:
Code:
root@Fileserver:~# rsync -av --delete /shared/fileshare/ /backup/backup
building file list ... done
created directory /backup/backup
./
manager/
manager/chironfs.txt
manager/cronman.txt
manager/curlftpfs.txt
manager/curlman.txt
manager/getnetaddress.txt
manager/grepman.txt
manager/rsyncman.txt
manager/tarman.txt
public/
user1/
user10/
user2/
user3/
user4/
user5/
user6/
user7/
user8/
user9/
rsync: chown "/backup/backup/manager/.chironfs.txt.c6MbJ7" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.cronman.txt.hdBG4P" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.curlftpfs.txt.t1sG4L" failed: Operation no                 t permitted (1)
rsync: chown "/backup/backup/manager/.curlman.txt.6oWPoW" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.getnetaddress.txt.V8z8Kk" failed: Operatio                 n not permitted (1)
rsync: chown "/backup/backup/manager/.grepman.txt.REh4WW" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.rsyncman.txt.ho8VNM" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.tarman.txt.BkcmeS" failed: Operation not p                 ermitted (1)

sent 211115 bytes  received 274 bytes  6710.76 bytes/sec
total size is 210263  speedup is 0.99
rsync error: some files could not be transferred (code 23) at main.c(977) [sende                 r=2.6.9]
root@Fileserver:~#
I tried the flag to adding the no flag to -p but it still didn't work, see below:
Code:
root@Fileserver:~# rsync -av --no-p --delete /shared/fileshare/ /backup/backup
building file list ... done
./
manager/
manager/chironfs.txt
manager/cronman.txt
manager/curlftpfs.txt
manager/curlman.txt
manager/getnetaddress.txt
manager/grepman.txt
manager/rsyncman.txt
manager/tarman.txt
public/
user1/
user10/
user2/
user3/
user4/
user5/
user6/
user7/
user8/
user9/
rsync: chown "/backup/backup/manager/.chironfs.txt.6Q3eP2" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.cronman.txt.FC8Orx" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.curlftpfs.txt.mlVSN9" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.curlman.txt.vlJ4b1" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.getnetaddress.txt.LXmft0" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.grepman.txt.SVuaye" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.rsyncman.txt.KTNYqA" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.tarman.txt.zcU90c" failed: Operation not permitted (1)

sent 211115 bytes  received 274 bytes  7686.87 bytes/sec
total size is 210263  speedup is 0.99
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]
 
Old 04-08-2010, 08:16 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
You are using "-a" which is just shorthand for all of "-rlptgoD". By reading the man page you should be able to work out which of "-rlptgoD" to drop.

Cheers,

Evo2.

PS. it looks like ownership is the problem not permissions: Ie. what happens if you use -rlptgD instead of -a?

Last edited by evo2; 04-08-2010 at 08:22 AM. Reason: Try dropping just o not both o and p.
 
1 members found this post helpful.
Old 04-08-2010, 09:01 AM   #3
replica88
Member
 
Registered: Nov 2009
Posts: 48

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by evo2 View Post
You are using "-a" which is just shorthand for all of "-rlptgoD". By reading the man page you should be able to work out which of "-rlptgoD" to drop.

Cheers,

Evo2.

PS. it looks like ownership is the problem not permissions: Ie. what happens if you use -rlptgD instead of -a?
Of course... how silly, Thank you

for anyone who is interested, here is what im now using and details of the flags taken from the man page:
Code:
root@Fileserver:/# rsync -rltzuv --delete /shared/fileshare/ /backup/backup     
building file list ... done
./
manager/
public/
user1/
user10/
user2/
user3/
user4/
user5/
user6/
user7/
user8/
user9/

sent 383 bytes  received 98 bytes  137.43 bytes/sec
total size is 180088  speedup is 374.40
-r, --recursive recurse into directories
-l, --links copy symlinks as symlinks
-t, --times preserve modification times
-z, --compress compress file data during the transfer
-u, --update skip files that are newer on the receiver
 
1 members found this post helpful.
Old 04-21-2015, 11:51 PM   #4
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,104

Rep: Reputation: 181Reputation: 181
Smile

Quote:
Originally Posted by replica88 View Post
Of course... how silly, Thank you

for anyone who is interested, here is what im now using and details of the flags taken from the man page:
Code:
root@Fileserver:/# rsync -rltzuv --delete /shared/fileshare/ /backup/backup     
building file list ... done
./
manager/
public/
user1/
user10/
user2/
user3/
user4/
user5/
user6/
user7/
user8/
user9/

sent 383 bytes  received 98 bytes  137.43 bytes/sec
total size is 180088  speedup is 374.40
-r, --recursive recurse into directories
-l, --links copy symlinks as symlinks
-t, --times preserve modification times
-z, --compress compress file data during the transfer
-u, --update skip files that are newer on the receiver
a very old post but still helpful..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions about rsync and '--link-dest' flag donnaaparis Linux - General 1 07-14-2011 01:55 PM
rsync (cygwin on XP) - -delete flag not working. bobby953 Linux - Newbie 1 08-05-2009 11:13 AM
Rsync Permissions Problem digitalquill Linux - Security 9 01-19-2009 09:03 AM
rsync ignore files Eazy-Snatch Linux - Networking 3 09-18-2006 07:45 AM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 03:49 PM


All times are GMT -5. The time now is 08:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration