Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to transfer files with extended attributes from my local system (SL 6.5) to a remote server (Centos 5.6). However, both scp and rsync are dropping the attributes, so I'm having to manually setfattr on the server. Any pointers on how to do this properly? Thanks.

share|improve this question
I have no centos 5.6 system handy, but on 6.5 you can use the -X, --xattrs for rsync and that should work. You can also use tar, it takes the attributes unless you specify not to take them with you with --no-xattrs – natxo asenjo Jun 10 '14 at 8:40
up vote 2 down vote accepted

AFAIK scp doesn't.

rsync has the -X, --xattrs switch for extended attributes (think SELinux contexts) and the -A, --acls to preserve ACL's, which are what you modify with setfattr.

share|improve this answer
Thanks - that did it. I was using -ax. – EML Jun 10 '14 at 8:50
Side note - just tried this - rsync -avX preserves whatever was set by setfattr, even though -a doesn't include -A. – EML Jun 10 '14 at 8:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.