The @
suffix is unique to Mac OS and is covered by this question, so I copied this part of my answer from there; it means the file has extended attributes. You can use the xattr
command-line utility to view and modify them:
xattr --list filename
xattr --set propname propvalue filename
xattr --delete propname filename
The +
suffix means the file has an access control list, and is common in any *nix that supports ACLs. Giving ls
the -e
flag will make it show the associated ACLs after the file, and chmod
can be used to modify then. Most of this is from the chmod
man page:
You add an ACL with chmod +a "type:name flag permission,..."
, and remove it with chmod -a
. The argument to chmod
is fairly complicated:
- type is either
user
or group
, to clarify if name
is referring to a username or a group name. If name
is unambiguous, you can omit the type
- name is the username or group the ACL applies to
- flag is
allow
if this ACL entry is granting a permission, or deny
if it's denying a permission
- permission is the actual permission being modified; you can list as many as you like, comma-separated
- delete -- Allow the file/directory to be deleted
- readattr -- Read basic attributes
- writeattr -- Write basic attributes
- readextattr -- Read extended attributes (using
xattr
, from above)
- writeextattr -- Write extended attributes
- readsecurity -- Read ACL info
- writesecurity -- Write ACL info
- chown -- Change owner
- Directory-specific permissions
- list -- Show the files/folders in the directory
- search -- Find a file/folder in the directory by name
- add_file -- Create a new file in the directory
- add_subdirectory -- Create a new directory in the directory
- delete_child -- Remove a file/directory in the directory
- Inheritance-control
- file_inherit -- ACLs on the directory are inherited by files
- directory_inherit -- ACLs on the directory are inherited by subdirectories
- limit_inherit -- Stops ACLs inherited by this directory from being inherited by subdirectories
- only_inherit -- Inherited by all newly created items but ignored
- File-specific permissions
- read -- Open the file for reading
- write -- Open the file for writing
- append -- Open the file for appending
- execute -- Run the file
In your particular example, most of the ACL entries are group:everyone deny delete
. That is, all users in the everyone
group (which is naturally everyone) are denied the permission to delete the folder. I believe, although I can't find any documentation about it, that these are default ACLs to stop you from removing essential root folders -- somebody correct this if that's not the case. The only other entry is group:com.apple.sharepoint.group.3 allow search
, which allows Directory Services to search for files by name in the /Library
folder
+
to indicate an ACL that goes beyond the traditional unix bits is common (at least FreeBSD, Linux and Solaris also do it; I don't know who did it first). – Gilles 'SO- stop being evil' Sep 06 '10 at 20:37xattr -c filename
to clear all attrs so that the file can be accessed now. – xi.lin Apr 24 '15 at 07:05xattr
does not support double minus arguments. Usexattr -h
for more info. – Robotbugs Apr 09 '18 at 00:30