[SC.LUG] File Perms- help!
David Holden
sc at mailman.lug.org.uk
Wed Aug 20 23:43:01 2003
On Wednesday 20 Aug 2003 5:50 pm, Robert Marshall wrote:
> On Wed, 20 Aug 2003, Ian Molton wrote:
> > On Wed, 20 Aug 2003 12:16:54 +0100
> >
> > Jonathan Dwerryhouse <jon.d@c2internet.net> wrote:
> >> The files file structure is such that the root folder is owned by
> >> root, but the folder within is owned by a user that has the same name
> >> as the folder itself.
> >
> > home directories?
> >
> > tar them up and ftp that. use something like
> >
> > tar zcf file.tar.gz <root dir>/
> > or
> > tar jcf file.tar.bz2 <root dir>/
>
> I thought Jonathan was asking what to do after this point - when the
> permissions had been already mangled, a sort of
>
> find . -type d -maxdepth 1 -exec chown -R '{}' '{}' ';'
>
> ... I've not tested this....
>
> Robert
if you use tar's the -p option permissions are preserved.
A more efficient way (and secure way) to transfer file structures would be to
use rsync and secure shell, e.g.
rsync -e ssh --delete -ogxrlptz --numeric-ids localdir \
root@othermachine:/targetdir
See man rsync for details.
Dave.
--
Dr. David Holden. (Systems Developer)
Visit: Crystallography Journals Online <http://journals.iucr.org>
Thanks in advance:-
Please avoid sending me Word or PowerPoint attachments.
See: <http://www.fsf.org/philosophy/no-word-attachments.html>
UK Privacy (R.I.P) : http://www.stand.org.uk/commentary.php3
Public GPG key available on request.
-------------------------------------------------------------