You are here

FACLs in OS X Mavericks

When I recently saw this output on my mac, I was shuffled back to the old days of Solaris 7 and FACLs:

2014-04-05 04:00:23 george2@g2mac:~
0$ ls -alF
-rw-r--r--@ 1 george2  staff  3569 Apr  5 15:47 test.py
-rw-r--r--@ 1 george2  staff   146 Apr  5 15:47 test.txt

It makes sense that Darwin has some sort of extended attributes, and we've been seeing it for years on mac, but I never tried to fuss with it on the command line. Every OS is getting in on this, but I haven't seen a consensus on what the 11th character should be (@, ., *), but if there's 11 characters for permissions, you can be sure there's something more going on.

After some quick searching around, here's what I did. The getfacl is done as ls -@

2014-04-05 04:00:55 george2@g2mac:~
0$ ls -alF@
total 24
drwxr-xr-x  5 george2  staff   170 Apr  5 15:47 ./
drwxr-xr-x  8 george2  staff   272 Apr  5 11:57 ../
-rw-r--r--  1 george2  staff    13 Apr  5 11:57 py-version
-rw-r--r--@ 1 george2  staff  3569 Apr  5 15:47 test.py
	com.apple.quarantine	  26
-rw-r--r--@ 1 george2  staff   146 Apr  5 15:47 test.txt
	com.apple.quarantine	  26

The setfacl is done as:

2014-04-05 04:04:03 george2@g2mac:~
0$ xattr -d com.apple.quarantine test.py
2014-04-05 04:04:03 george2@g2mac:~
0$ xattr -d com.apple.quarantine test.txt
2014-04-05 04:04:03 george2@g2mac:~
0$ ls -alF
total 24
drwxr-xr-x  5 george2  staff   170 Apr  5 15:47 ./
drwxr-xr-x  8 george2  staff   272 Apr  5 11:57 ../
-rw-r--r--  1 george2  staff    13 Apr  5 11:57 py-version
-rw-r--r--  1 george2  staff  3569 Apr  5 15:47 test.py
-rw-r--r--  1 george2  staff   146 Apr  5 15:47 test.txt

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer