[ubuntu-uk] rsync chgrp problem - advice, please?
matthew at truthisfreedom.org.uk
Thu Jun 7 10:58:53 BST 2007
On Thu, 07 Jun 2007 10:50:25 +0100, luxxius <luxxius at googlemail.com> wrote:
> Matthew Macdonald-Wallace wrote:
>> A very simple thing (that could have solved the whole thing in the first
> place now I think about it...)
>>> cd ~/music
>>> sudo chmod -Rvf 644 .
>>> sudo chown -Rvf diana:root .
>> this will recursively apply the permissions and the ownership to all
> files in the folder and all sub folders.
> Matt >>> I'm going to have to run this after a 'sudo su', as follows
> sudo su
> cd /home/diana/music
> chmod -Rvf 644
> chown -Rvf diana:root
> (and I won't hear about any 'fails' because of the -f; is that right?
> Does it matter?)
IIRC (and I've only got a windows-based PC in front of me at the moment so I can't check!) the "-f" means "Force" as opposed to "ask".
> But more importantly, is it safe to run this as root?
I can't see why not, it's not opening up an extra port on the firewall or granting permissions that will enable buffer overflows etc (that I know of), is there a reason why you can't do an "sudo" for each command?
> (BTW the reason for not using this general reset before was that I want
> to use rsync to back up the music folder, and I guess (it really is a
> guess) that re-writing all the owner/group and permissions would result
> in rsync re-copying *all* the files to the usb drive - a job that ties
> up the machine for about four hours!)
I've never really used RSync, so I don't know if it will resync on the entire folder if the permissions change or if rsync just looks at the folder and says "this is a new file, please copy it". Others far wiser than me will be able to answer this one!
Ubuntu User( http://www.ubuntu.com/)
More information about the ubuntu-uk