File Permissions mode ending in @ or +
+
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.
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
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>