Re: How to preserve permissions when copying to a root squishing NFS mounted dir?

From: mgrd (mgrd_at_gmx.net)
Date: 03/22/04


Date: Mon, 22 Mar 2004 18:49:25 +0100

Jack Ryan wrote:
> I have a NAS (Snap 4500) which I mount on my /mnt/nas (in a RedHat 9.0
> box) in order to backup files:
>
> # mount -t nfs snap4500:/SHARE1 /mnt/nas
>
> The problem arises when I try to backup files as root. This makes my
> files to get squished to nfsnobody:nfsnobody
>
> # cp -pR <source> /mnt/nas
> or
> # cd <source>;tar cf - . | (cd /mnt/nas;tar xfBp - )
>
> I've tried the getfacl/setfacl game and didn't work, also I don't want
> to create tar compressed files or similar. How could I preserve the
> permissions and specially the SGID?

to preserve the permissions use find(1) piped to cpio(1):
% cd <source-directory>
% find . -depth -print | cpio -pudm <dest-directory>

re. the SGID:
not sure if I got you, but:
you may check the numeric id (`ls -ln') of the owner and compare this id
to the id on the other host.



Relevant Pages

  • Re: SBS 2003 and Buffalo TeraStation
    ... I am sure the TeraStation will ... network can get at the backup files), and also for misc files which ... don't need permissions. ...
    (microsoft.public.windows.server.sbs)
  • Re: Log shipping
    ... Depending on how you set it up, it will probably need permissions to the ... backup files on the other server (or the destination on the remote server) ...
    (microsoft.public.sqlserver.setup)
  • How to preserve permissions when copying to a root squishing NFS mounted dir?
    ... The problem arises when I try to backup files as root. ... permissions and specially the SGID? ... Jack Ryan ...
    (comp.unix.admin)
  • Re: How to preserve permissions when copying to a root squishing NFS mounted dir?
    ... > The problem arises when I try to backup files as root. ... in the least what tricks you attempt on the RedHat end. ... and configure it to allow your RedHat box root ... this is a FAQ because the NFS documentation mentions this UID ...
    (comp.unix.admin)
  • Re: Help, How to backup with YaST to CDRW?
    ... >their hard drives, and what applications they are using. ... I select multiple CDRW instead of the hard disk (but it still puts the ... it makes a backup.tar and a backup.xml file in the root ... delete backup files of hard disk to save room and so that you are not ...
    (alt.os.linux.suse)