LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-30-2007, 07:23 AM   #1
Abstractt
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Rep: Reputation: 0
Question Rsync set permissions destination


Hi Everyone,

I'm using rsync to backup all of the websites we have. It's logging in with ssh and using ssh keys so it all goes smoothly.

I like to change the permissions, ownership and group this command is setting on the downloaded files. These permissions, ownerships and groups are completly different from the one we use on the server. Is it possible to make this happen within the rsync command? Or should i run a shell script afterwards to change this?

This is the adjusted (for security reason) command I'm using:

rsync -rlvz --size-only --update --exclude="*\.zip" --exclude="*_-_*" --owner=admin --group=nobody --chmod=a+rwx,g+rwx,o+r -e 'ssh -i [ssh key]' [user]@[server]:[source] [destination]

My quess is that --owner=admin --group=nobody doesn't exists and should be used in the form --owner --group for perserving the ownership and group of the source.

I think the option --chmod=a+rwx,g+rwx,o+r is correct, but strange enough it doesn't change the persmissions to 774. Can someone help me?

Thanks Arian
 
Old 11-30-2007, 07:41 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
If these are backups, I'd say you may want to preserve the unique ID's and Permissions on these files so if or when you need to restore, they'll be intact as their original owner and permission without any interaction.

If you do insist on changing the permissions, might want to somehow write a script that knows how to revert back before a restore..
 
Old 11-30-2007, 07:52 AM   #3
Abstractt
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Question

When data needs to be restored it will be restored ftp, which will set the right permissions after uploading. So we don't care about losing the original ownerships and permissions.

Do you know how I can change the permissions, ownerships and groups on the downloaded files? What is wrong with the command I'm using?
 
Old 09-30-2010, 02:05 AM   #4
hendrohwibowo
LQ Newbie
 
Registered: Oct 2009
Posts: 1

Rep: Reputation: 0
i try this

--chmod=a+rwx,g+rwx,o-wx, resulting in 774

Last edited by hendrohwibowo; 09-30-2010 at 02:05 AM. Reason: typo
 
  


Reply

Tags
permissions, rsync, set


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync with permissions, but not as root nifflerX Linux - General 5 09-28-2011 11:14 PM
scp from a linux behaving strange and fubar'ing permissions on destination bsd system rg.viza Linux - Security 3 07-07-2007 03:00 PM
Remote rsync permissions error gigamike Linux - Networking 0 05-19-2007 07:21 PM
SBackup Destination Permissions vba_djs Linux - Newbie 0 05-03-2007 09:07 AM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 02:49 PM


All times are GMT -5. The time now is 02:10 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration