43

I was changing file permissions and I noticed that some of the permissions modes ended in @ as in -rw-r--r--@, or a + as in drwxr-x---+. I've looked at the man pages for chmod and chown, and searched around different help forums, but I can't find anything about what these symbols mean.

  • 3
    This is not a duplicate. Specifically, it asks about + and the linked question does not. – Dan Dec 22 '15 at 21:58
31

+ means that the file has additional ACLs set. You can set them with setfacl and query them with getfacl:

martin@martin ~ % touch file
martin@martin ~ % ll file 
-rw-rw-r-- 1 martin martin 0 Sep 23 21:59 file
martin@martin ~ % setfacl -m u:root:rw file 
martin@martin ~ % ll file 
-rw-rw-r--+ 1 martin martin 0 Sep 23 21:59 file
martin@martin ~ % getfacl file 
# file: file
# owner: martin
# group: martin
user::rw-
user:root:rw-
group::rw-
mask::rw-
other::r--

I haven't seen @ yet personally, but according to this thread it signifies extended attributes, at least on MacOS. Try xattr -l on such a file.

  • 3
    Just a quick note: it doesn't look like OSX has setfacl or getfacl. Instead, it packs that extra functionality into chmod. Martin's answer pointed me to the right search terms, which turned up this page: thomaskeller.biz/blog/2011/06/04/acls-on-mac-os-x – Nathan Sep 23 '13 at 20:13
  • great the xattr comand output – Evhz Jan 8 '18 at 11:02
14

The @ on OSX means that they're extended attributes. See here: http://scottlab.ucsc.edu/~wgscott/xtal/wiki/index.php/Extended_Attributes

Example

$ ls -lF *.pdf
-rw-r--r--@ 1 wgscott  staff   222K Feb 27 17:08 1229.pdf

The @ tells you that the file has some form of extended attribute associated with it. Let's have a look:

$ xattr -l 1229.pdf

com.apple.metadata:kMDItemWhereFroms:
0000   62 70 6C 69 73 74 30 30 A1 01 5F 10 37 68 74 74    bplist00.._.7htt
0010   70 3A 2F 2F 77 77 77 2E 73 63 69 65 6E 63 65 6D    p://www.sciencem
0020   61 67 2E 6F 72 67 2F 63 67 69 2F 72 65 70 72 69    ag.org/cgi/repri
0030   6E 74 2F 33 32 33 2F 35 39 31 38 2F 31 32 32 39    nt/323/5918/1229
0040   2E 70 64 66 08 0A 00 00 00 00 00 00 01 01 00 00    .pdf............
0050   00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00    ................
0060   00 00 00 00 00 44                                  .....D

com.apple.quarantine: 0000;49a88e87;Safari.app;|com.apple.Safari
10

For those searching for why they can't edit a file with "@" or "+" at the end of it on mac osx, the reason is probably related to metadata, for example the file was copied from a Time Machine backup via the terminal and not file explorer.

Two steps will remove the metadata and make it writeable again on MacOS:

# Remove the metadata attributes
xattr -c <some file>

# Remove the file ACL(s)
chmod -N <some file>
1

As others have noted, it is indeed metadata. One of the uses for this is to store download information such as where the file was downloaded from. This allows MacOS to query you about opening a file downloaded from the Internet, for example:

$ xattr -p -l com.apple.metadata:kMDItemWhereFroms foo
com.apple.metadata:kMDItemWhereFroms:
00000000  62 70 6C 69 73 74 30 30 A2 01 02 5F 10 68 68 74  |bplist00..._.hht|
00000010  74 70 3A 2F 2F 64 6F 77 6E 6C 6F 61 64 73 2E 70  |tp://downloads.p|
00000020  65 72 66 73 6F 6E 61 72 2E 6E 65 74 2F 72 65 64  |erfsonar.net/red|
00000030  68 61 74 2F 6D 61 69 6E 2F 72 70 6D 73 2F 65 6C  |hat/main/rpms/el|
00000040  36 2F 69 33 38 36 2F 6D 61 69 6E 2F 52 50 4D 53  |6/i386/main/RPMS|
00000050  2F 70 65 72 66 73 6F 6E 61 72 2D 75 69 2D 77 65  |/perfsonar-ui-we|
00000060  62 2D 31 2E 37 2E 31 2E 65 6C 36 2E 6E 6F 61 72  |b-1.7.1.el6.noar|
00000070  63 68 2E 72 70 6D 5F 10 2B 68 74 74 70 3A 2F 2F  |ch.rpm_.+http://|
00000080  64 6F 63 73 2E 70 65 72 66 73 6F 6E 61 72 2E 6E  |docs.perfsonar.n|
00000090  65 74 2F 69 6E 73 74 61 6C 6C 5F 70 73 75 69 2E  |et/install_psui.|
000000A0  68 74 6D 6C 08 0B 76 00 00 00 00 00 00 01 01 00  |html..v.........|
000000B0  00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00  |................|
000000C0  00 00 00 00 00 00 A4                             |.......|
000000c7

protected by Community Aug 13 '18 at 1:03

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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