Questions tagged [extended-attributes]
The extended-attributes tag has no usage guidance.
51 questions
1
vote
1
answer
77
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 ...
4
votes
2
answers
598
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....
1
vote
1
answer
357
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, ...
0
votes
0
answers
185
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 ...
1
vote
1
answer
600
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 ...
3
votes
1
answer
758
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 ...
1
vote
3
answers
2k
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 ...
1
vote
3
answers
873
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 ...
3
votes
0
answers
428
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 ...
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. ...
2
votes
2
answers
125
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?
6
votes
0
answers
88
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.
1
vote
1
answer
102
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 ...
0
votes
1
answer
52
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?
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 ...
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 ...
2
votes
0
answers
171
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 ...
0
votes
0
answers
574
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 ...
2
votes
1
answer
665
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 ...
0
votes
0
answers
620
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
-...
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")?
1
vote
0
answers
40
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, ...
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 ...
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 ...
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 ...
2
votes
2
answers
159
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 ...
13
votes
2
answers
29k
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 ...
4
votes
1
answer
213
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....
1
vote
1
answer
177
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 ...
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 ...
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 ...
4
votes
1
answer
979
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 ...
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, ...
2
votes
0
answers
44
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 ...
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?
11
votes
1
answer
2k
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:...
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 ...
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 ...
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 ...
1
vote
1
answer
441
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,...
1
vote
1
answer
424
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 ...
0
votes
0
answers
92
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 ...
17
votes
2
answers
21k
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....
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, ...
0
votes
1
answer
609
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 ...
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/...
1
vote
1
answer
926
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 ...
0
votes
1
answer
118
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 ...
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.
...
1
vote
1
answer
484
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 ...