Skip to main content

Questions tagged [extended-attributes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
58 views

Preview quarantine madness: it quarantines files as I'm editing them

Preview seems to set the quarantine on files that it opens. Kind of, unpredictably. And, it could be, that quarantine is set randomly through other mechanisms; not sure. Let me illustrate. I have ...
OsamaBinLogin's user avatar
4 votes
2 answers
480 views

To copy a file and preserve its comment

Is it possible to copy an individual file and preserve its comment? Here is what I have tried. Nothing here works for me on macOS 14.3.1 and Zsh 5.9 (x86_64-apple-darwin23.0). cp file.txt file-copy....
user avatar
1 vote
1 answer
291 views

Can't view extended attributes of a directory in MacOs Sonoma with xattr, even though they are flagged in the directory listing

When I do an ls -lg of my user directory I can see a file directory called: drwx------+ 33 staff 1056 Oct 19 11:09 Movies Which, as you can see, has a plus sign at the end of the permissions, ...
knicknack's user avatar
0 votes
0 answers
125 views

Risks of removing Extended Attributes?

I have a multi-GB directory tree of documents that I need to keep synchronized between a macOS and a Linux host. I'm thinking of using xattr on Mac OS to remove extended attributes on every single ...
Keith Bennett's user avatar
1 vote
1 answer
456 views

Trying to read xattr values on multiple files

In trying to read all the values of the extended attributes on a single file, if I do xattr -l <filename> | while read ATTR; do xattr -p $ATTR <filename> done I get what I expect.  But ...
WGroleau's user avatar
  • 5,065
2 votes
1 answer
508 views

Preserving date added when copying folders

Here is my use case but the question is a general one: how to duplicate a folder and preserve the Date Added info. My Downloads folder is set to Group By and Sort By Date Added. I'd like to clean the ...
lhf's user avatar
  • 7,388
1 vote
3 answers
1k views

Where are file extended attributes saved?

It seems to be an obvious question, but for some reason I cannot find an answer. Apparently, I just discovered a well-known MacOS feature: extended file attributes. Context: When I download a file, I ...
texnic's user avatar
  • 329
1 vote
3 answers
723 views

How to parse values from macOS extended file attributes?

If you download a file from the internet using Safari, some extended attributes are added to the downloaded file, among which com.apple.metadata:kMDItemWhereFroms which contains the original URL of ...
ccpizza's user avatar
  • 3,025
3 votes
0 answers
350 views

Why does defaults only read from files with certain extended attributes?

It seems that defaults read only works on property list files in certain folders (e.g. Desktop, Downloads) when the extended attribute com.apple.macl contains a specific value otherwise it reports ...
Stefan Schmidt's user avatar
2 votes
1 answer
1k views

Accidentally deleted file from /Library/Preferences/

I have deleted the file com.apple.HIToolbox.plist from /Library/Preferences/ by mistake. I have a copy of the file saved. I hoped the file would be reconstructed after reboot, but that didn't happen. ...
Kolja's user avatar
  • 696
2 votes
2 answers
119 views

What happens if you add the attribute "com.apple.icloud.desktop" to just a random folder that lives in your home folder?

Will it start to behave just like Desktop and Documents? Or will it break iCloud drive?
Evert's user avatar
  • 191
6 votes
0 answers
82 views

Is it possible to mark a folder in the iCloud drive folder as "never offload this"?

I can imagine that there might be an attribute that I could add using xattr, but I have no idea what that attribute would be.
Evert's user avatar
  • 191
1 vote
1 answer
95 views

How to move/copy/process files based upon any extended attributes in Terminal/shell?

I need to move a number of files based on various extended attributes, but it's not clear how to test and take action based on these. For a basic example, what if I were to want to find and move all ...
ylluminate's user avatar
  • 5,461
0 votes
1 answer
47 views

Is Disk Drill able to recover extended attributes?

Is Disk Drill, which is commercial file recovery software, able to recover extended attributes of normal files?
Akira Okumura's user avatar
6 votes
1 answer
2k views

How to stop com.apple.metadata:kMDItemWhereFroms attribute from being saved in files downloaded from browser?

Recently I found out that macOS saves full download link to metadata of file which kept when file moves between computers which I found a big security risk for me. Is it possible to disable saving ...
VityaSchel's user avatar
11 votes
2 answers
5k views

"ls" works, but "ls -l" gives me "Operation not permitted"

There are several folders on my system (Monterey 12.2.1) on which I can successfully run ls, but if I run ls -l on the same folder I get "Operation not permitted". I am running these ...
AaronI's user avatar
  • 221
2 votes
0 answers
147 views

When using rsync to sync a sparsebundle are --delete and -X for extended attributes options recommended?

I have scripts that rsync Time Machine sparsebundles to a remote server for offsite backups. I've always assumed that extended attributes are a function of the internal image filesystem and not the ...
1jben794's user avatar
0 votes
0 answers
529 views

How to set the version number metadata on a zip file?

I use zip files as a simple way of bundling some macOS software for distribution in our organization. I want to set the version number displayed by the Finder's Get Info box, similar to how a version ...
mhucka's user avatar
  • 1,347
2 votes
1 answer
601 views

How to maintain extended attributes with file transfer

I am modifying file attributes, however I am modifying them for distribution to non-technical people. Is there anyway I can write attributes to a file and they actually persist when I move them from ...
TheHidden's user avatar
  • 121
0 votes
0 answers
588 views

OneDrive, extended attributes, and permission denied – what's going on?

I have a number of files synced with Microsoft's OneDrive. Recently, I found all of the files were unopenable with permission denied, even though I apparently had full access: % ls -l notes/centos -...
Norman Gray's user avatar
1 vote
2 answers
1k views

Find files with comments in Finder search?

How can I find all the files on my system that have a Finder comment (the one you can see in "Comments" when using "Get Info")?
Max Well's user avatar
  • 299
1 vote
0 answers
39 views

Method to determine if a mounted (physical or server) volume supports macOS extended attributes

Using xattr -w I want to write a proprietary extended attribute (XA) and an additional user tag to files. This also needs to happen on other volumes than the boot volume. On specific volumes, however, ...
JayB's user avatar
  • 291
25 votes
1 answer
11k views

Why can macOS have two files with same name?

I found there are two files with same names but one with extended attribute while the other not (Actually I used sed command to do in-place operation with one file before): -rw-r--r-- 1 nanxiao ...
Nan Xiao's user avatar
  • 523
1 vote
1 answer
3k views

sudo chown "Operation not permitted" - how to resolve permissions to allow chown by admin or root users?

As sanity check I was sudo chowning some folders due to having run some commands previously that generated some root owned files in my $HOME. I ended seeing an error in this process that got me ...
ylluminate's user avatar
  • 5,461
4 votes
1 answer
2k views

How to disable com.apple.quarantine on Catalina

I am constantly downloading files from our servers and they get marked with the com.apple.quarantine attribute. How can I forever (and ever, until the universe collapses) prevent the OS from setting ...
Thomas's user avatar
  • 359
2 votes
2 answers
142 views

How To Strip All Finder Attributes for Some Device

After copying files to an NTFS and FAT Extended devices, I ended up with numerous misplaced finder attributes, due to the broken NTFS and FAT support in OSX's Finder. I.e. I get these can't be changed ...
SmugLispWeenie's user avatar
13 votes
2 answers
26k views

Disable the use of the "com.apple.quarantine" extended attribute on Mojave

I recently got Mojave. Could somebody tell me whether it's possible to disable the use of the "com.apple.quarantine" extended attribute, for all apps that I have now or will ever download in the ...
Kenny83's user avatar
  • 345
4 votes
1 answer
209 views

Safari 13 update sets negative com.apple.quarantine -1 making multiple directories inaccessible

Updated to Safari 13 today on Mojave 10.14.6 and suddenly a bunch of my ~/Library/ directories are inaccessible via terminal and other apps (even with sudo). Checking the xattr I see: com.apple....
Jason Ang's user avatar
1 vote
1 answer
173 views

How to zip a script-file for MacOS under Windows and give it correct attributes?

I am working under Windows 10 and am putting together a few data-files and a simple bash-script that I want to share with Mac-Users. (I am just learning MacOS, so may have drawn wrong conclusions ...
MBaas's user avatar
  • 137
3 votes
3 answers
2k views

How do I copy user home directories from one system to another while preserving all attributes?

I am in the process of dismantling an old macOS High Sierra Server and rebuilding it as a macOS Mojave Server. I've exported Users and Groups from OpenDirectory on the old one and imported them in ...
gctwnl's user avatar
  • 714
3 votes
1 answer
3k views

In Finder and Terminal — can not delete a folder, (Error = "Directory not empty")

Anytime I've run up against this in the past, I was always able to figure it out, and usually via the command line. I'll list all the commands I tried so far, followed by other things I've tried below ...
Wharf Cat's user avatar
4 votes
1 answer
835 views

How to convert a file with extended attributes to AppleDouble format?

How can I convert a file, which has extended attributes, to AppleDouble format? I know how to convert from AppleDouble format using the Terminal utility dot_clean, but what utility can be used to ...
Rinzwind's user avatar
  • 3,731
5 votes
2 answers
4k views

Extended attributes reappear when reconnecting external drive

Some files on my external drive appeared grey out. Hence, I removed all the extended attributes using xattr -rc command which successfully does the trick and all my files appears normal. However, ...
geeksal's user avatar
  • 103
2 votes
0 answers
42 views

How to ensure that you retrieve all permission attributes (including ACLs) of a file or folder from the shell?

I would like to retrieve ALL permissions (including ACLs) and attributes of files and folders (both) from a folder and its accompanying files on a drive. Most frequently one sees ls -le being used to ...
ylluminate's user avatar
  • 5,461
2 votes
2 answers
3k views

How can I give a file the com.apple.quarantine attribute on mac

I have used xattr -d com.apple.quarantine /Users/username/Desktop/app_name.app to remove the attribute but I don't know how to give the attribute again. Could you please help me?
Glol's user avatar
  • 21
11 votes
1 answer
1k views

Is there a way to get Spotlight to search for xattr?

I like to tag files with xattr, e.g. xattr -w user.foo bar myfile. Is there a way that I can then use Spotlight to search for a given xattr key (or key-value pair)? For example, if I put foo or foo:...
Andrew's user avatar
  • 497
4 votes
2 answers
4k views

How to verify if an extended attribute exist?

When running xattr -d com.apple.quarantine /Applications/XXX.app sometimes I get xattr: /Applications/XXX.app: No such xattr: com.apple.quarantine How does one verify if any named attribute ...
qazwsx's user avatar
  • 2,631
2 votes
2 answers
143 views

Unable to enter directories in Finder after moving directories to NAS

I have a NAS, which I use for storing my old photos. When moving the remainder of my 2016 photos, the following problem occurred, but without any error message during the move operation. The move ...
Kristian's user avatar
3 votes
0 answers
61 views

Is there version control software with commit messages that preserves macOS tags?

As I mentioned in my answer on tags best practices, the distributed version control software (VCS) Git does not preserve macOS tags (or other extended file attributes). Is there version control ...
Big Mac's user avatar
  • 430
1 vote
1 answer
436 views

Error messages in rsync

When I run rsync -avz --exclude-from=exc ~/ /Volumes/Backup/home/ I get the message sending incremental file list ./ .DS_Store ...<snip>... (lots of files).... End of list of files sent 72,...
David Epstein's user avatar
1 vote
1 answer
387 views

Quarantined root directory on primary drive?

I've been experiencing performance issues on my mid-2011 mac mini (running El Cap) for a while now -- beachballs, spotlight issues, general slowness -- and have been so far unable to discern the ...
Andy S.'s user avatar
  • 11
0 votes
0 answers
91 views

Difference in OS X file names due to extended attribute or resource fork?

I've done a diff on two file names (via Terminal), whose textual content on visual inspection appear to be the same file. diff however reports the two as differing. The only difference I could ...
Alex Ixeras's user avatar
  • 1,386
17 votes
2 answers
20k views

How to set (restore) the com.apple.quarantine attribute?

There are questions with good answers that explain how to remove the com.apple.quarantine extended attribute but I was wondering how does one restore / set it back again? I tried this: xattr -w com....
ILIV's user avatar
  • 395
1 vote
1 answer
1k views

What does these extended attributes mean and where are they documented?

For some reason a directory I had (Vundle.vim) got randomly copied to another directory (got copied from ~/.vim to ~/dotfiles/.vim with strange permissions and what looks like no contents. Anyways, ...
Mattias's user avatar
  • 129
0 votes
1 answer
598 views

Recursive set creation date of pictures and videos based on filename

I have a folder structure of thousands of pictures and videos. They are all exported and therefore have the same creation date, time. I would like to set the creation date for all the files according ...
hausii's user avatar
  • 1
0 votes
1 answer
1k views

OSXFUSE, BindFS and HFS+ extended file attributes

I use BindFS with OSXFUSE to mount some folders on an external drive on mount points within my user home folder. This is a sample line from my fstab: /Volumes/Content/Pictures /Users/Me/...
retrography's user avatar
1 vote
1 answer
925 views

Will HFS+ extended attributes be lost on FreeNAS?

I have FreeNAS server partially set up on an HP Microserver, but just realized that I may lose all my extended attribute metadata on the files that come from my Macs (which is what most of my ...
iconoclast's user avatar
  • 10.1k
0 votes
1 answer
114 views

Extracting WhereFroms Data to a File

I see a number of posts on how to delete the WhereFrom extended attributes data, but I would like to do the opposite and extract the information into a file. I download Creative Commons photos from ...
troydwhite's user avatar
6 votes
1 answer
7k views

Files Greyed out in Finder - Potential extended attributes issue?

I am having a rather strange issue with some image files I have on a local file server. I have spent a while trying to figure it out, to no avail. Hopefully someone on here can offer some assistance. ...
Stefan's user avatar
  • 61
1 vote
1 answer
479 views

Why files created by Kaleidoscope App are in quarantine?

I like to use Kaleidoscope (v 2.1.0 - build 133.01 under Mac OS X 10.8.5) to compare 2 directories. But, when I create files by copying them from a directory to another using ...
Pascal Qyy's user avatar