From: Mark D. B. <md...@ju...> - 2017-06-02 05:16:07
|
Rock Lee <roc...@gm...> writes: > I want to tar files with security.ima but failed. I tried command > like this: > > tar cvjf file.tar.bz2 file --xattrs > > I noticed user namespace extened attribute would be preseved, but > security.ima would be lost. Could anyone give me some advices ? You should try this command: getfattr -d -m . file if you are a normal user, then you will not see any of the security.* attributes. If you are the root user, then they should display as well. If you are user root, the command you want should be tar --xattrs -cvjf file.tar.bz2 file assuming that you are using a version of tar that has been built to handle extended attributes. See also https://unix.stackexchange.com/questions/300168/how-do-i-get-a-dump-of-all-extended-attributes-for-a-file Enjoy! -- Mark |