Questions tagged [xattr]

Use the xattr tag for questions about extended attributes on files in a (Linux or macOS) file system.

Extended attributes are descriptions of the file stored separately from the file data. They are read by special system calls. People often first encounter them as a result of seeing an @ after the permissions in the output from ls -l. (The related symbol, a +, indicates that there are ACLs — access control lists — associated with the file.)

On macOS (or Mac OS X), you find out about the extended attributes with the @ option to ls. For example, a file might have the extra attribute:

$ ls -l@d Cscope
drwxr-xr-x@ 3 someuser  staff  102 Mar  8 21:49 Cscope
    com.apple.quarantine     30 
$

indicating that the directory had been copied from the internet and had not yet been marked as clean/safe. The Time Machine software makes extensive use of extended attributes too.

For macOS, the system calls are listxattr(), flistxattr() getxattr(), fgetxattr(), removexattr(), setxattr(). Linux adds lgetxattr() to this set.

96 questions
0
votes
1 answer

Change file metadata using xattr in sandboxed Mac app

I am trying to remove the "com.apple.quarantine" attribute in files placed in ~/Library/Containers/....../Library/Application Support. Using NSTask and xattr leads to "Operation not permitted" messages in console. As second option I tried the…
Christian
  • 15
  • 2
-1
votes
1 answer

rsync with --fake-super not preserving owner after restore - Monterey/Synology DS920+/rsync 3

Working through a backup script debug backup/restore on: macStudio M1 / macOS Monterey <-> Synology DS920+ On the mac, I've downloaded HomeBrew rsync 3.2.4 On the synology, I'm running what it shipped with - rsync 3.1.2 For debug, I used…
ric982
  • 1
  • 2
-1
votes
2 answers

What does mean number near extended attributes in ls -l@ output?

What does mean number near extended attributes in ls -l@ output and how i can get it? drwxr-xr-x@ 41 root wheel 1394 Nov 7 14:50 bin com.apple.FinderInfo 32 //this number com.apple.rootless 0 //and this
EmanRuoy
  • 77
  • 1
  • 2
  • 9
-1
votes
1 answer

Implementation of filesystem (and) permissions

I am trying to understand the way the filesystem and the kernel are related, and how they work together, specifically regarding the permissions. (I know that, in fact, the filesystem is running in kernel space, but in this context I consider them…
-1
votes
1 answer

xattr command error while setting security attributes

I was running following commands to set extended attributes, but it is giving Could not set extended attribute. Operation not supported error. xattr set security.SMACK64 "*" /dev/null xattr set security.SMACK64 "*" /dev/zero While checing the…
Ravi A
  • 421
  • 2
  • 9
  • 21
-2
votes
1 answer

Running an executable on Mac without giving permissions to all Unidentified Developers

Mac does not allow users to run files from Unidentified Developer to save the users. But now if you know that it was built by your colleague then you can run it. One of the ways to do this would be to allow apps to be run from Unidentified…
user 923227
  • 2,528
  • 4
  • 27
  • 46
1 2 3 4 5 6
7