Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac OSX file permissions has '@' - how to remove that '@' [closed]

How can I remove that '@' character from the file permissions?

'@' in file permissions for Mac/OSX machines, is used to show that an extended attribute is set with this file.

  1. Tried chmod 755 galaxy-ansible.yml but that didn't help.
  2. Tried echo | chmod -E galaxy-ansible.yml, didn't help (even with using sudo).
  3. Tried xattr -d galaxy-ansible.yml, that didn't help either (even with using sudo).

I even did the above operations as root user, still '@' character is not going away from file's permissions.

[arun@MacBook-Pro-2 ~/aks/anisble] $ ls -l@ galaxy-ansible.yml 
-rwxr-xr-x@ 1 arun  staff  270 Dec 22 12:31 galaxy-ansible.yml
    com.apple.quarantine     67 

My ~/aks folder is mapped to a CentOS vagrant box and if I'm on the vagrant box, doing ls -l doesn't give me '@' (as it's not a Max/OSX machine):

-rwxr-xr-x. 1 vagrant vagrant  270 Dec 22 00:12 galaxy-ansible.yml

On my Mac/OSX machine, there are other .yml files but those don't have '@' in the file permissions so I'm trying to remove '@' from galaxy-ansible.yml file (on Mac machine).

Right now the whole roles/.. folder has '@' character for any folder/files.

-rwxr-xr-x@ 1 arun  staff  1132 Dec 21 17:12 README.md
drwxr-xr-x@ 3 arun  staff   102 Dec 21 17:12 defaults
drwxr-xr-x@ 3 arun  staff   102 Dec 21 17:12 handlers
drwxr-xr-x@ 4 arun  staff   136 Dec 21 17:12 meta
drwxr-xr-x@ 5 arun  staff   170 Dec 21 17:12 tasks
drwxr-xr-x@ 7 arun  staff   238 Dec 21 17:12 templates
like image 297
AKS Avatar asked Dec 22 '16 19:12

AKS


People also ask

How do you remove permissions on a Mac?

In the Sharing & Permissions section, do any of the following: Add a user or group: Click the Add button below the list, select a user or group, then click Select. Remove a user or group: Select the user or group, then click the Remove button below the list.

How remove extended attributes OSX?

To Remove All Extended Attributes On Many Files app and start typing xattr -rc , include a trailing space, and then then drag the file or folder to the Terminal. app window and it will automatically add the full path with proper escaping.

How do I change app permissions on Mac?

To change application permissions on a mac, click the Apple icon → Click "System Preferences" → Click "Security & Privacy" → Click "Privacy" → Click on a service → Click the check box to add or remove an app's permission to the selected service.


Video Answer


1 Answers

The following commands helped in clearing the extended attribute at file / folder(recursive) level.

xattr -c <yourfilename>

or

xattr -cr <yourfoldername>
like image 118
AKS Avatar answered Oct 06 '22 10:10

AKS