mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesse Pollard <pollard@admin.navo.hpc.mil>
To: "Eric Chen" <echen@ateonix.com>, <linux-kernel@vger.kernel.org>
Subject: Re: changing file copy to support extended attributes
Date: Wed, 12 Feb 2003 15:30:30 -0600	[thread overview]
Message-ID: <200302121530.30427.pollard@admin.navo.hpc.mil> (raw)
In-Reply-To: <NFBBIGILIDAABCBKKGMLAECOCCAA.echen@ateonix.com>

On Wednesday 12 February 2003 01:35 pm, Eric Chen wrote:
> Hi,
>
> I wanted to modify file copy so it supports extended attributes. I am using
> extended attributes provided by the XFS filesystem, and right now when I
> copy a file with an extended attribute bit set on, the copy of the file
> does not preserve the extended attribute. I could use some help in this
> area because I am not sure where to start. If anyone has some suggestions
> or can offer me some help or resources to go to, please let me know.

You have to modify "cp" and "mv" (since a "mv" that crosses mount points
is equivalent to a "cp original destination/copy; rm original".

Now you also need to realize that you might NOT be able to copy all of the 
extended attributes (XFS supports system and user attributes, and only the
user attributes can be copied). This is the usual reason extended attributes
are not copied at all.

Another is what about applications that may copy files too: cat, tar, cpio, 
dd, vi, ed, ... and sh (remember the old "shcat" script:
	while[read v]; do; echo $v; done <original >copy)

And what do you do if the destination is not XFS?

And what about when the user is not the owner of the file, but does have read 
access?

-- 
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

      parent reply	other threads:[~2003-02-12 21:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-12 19:35 Eric Chen
2003-02-12 20:11 ` Andreas Dilger
2003-02-12 21:30 ` Jesse Pollard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200302121530.30427.pollard@admin.navo.hpc.mil \
    --to=pollard@admin.navo.hpc.mil \
    --cc=echen@ateonix.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®