It seems that a keychain file (with extension .keychain
) will usually have an invisible file associated with it, located in the same directory.
This invisible file always has these properties:
- It is empty (zero bytes).
- Its permissions are
0444
(read-only for all users). Its name consists of
.fl
followed by 8 hex characters. For example:.fl043D1EDD .fl947E1BDB .fl9FAF0136 .fl12663120 .fl8E6EFC6C .flCF600F4B .fl1D8ECE61 .fl0D1D1BA9 .fl79E88CD1 .fl62323D2F .fl75262C83 .fl652F188E
The invisible file can be deleted, but when the keychain's contents are next modified, the invisible file will be recreated with the same name.
Here are some steps to demonstrate, using the Keychain Access utility:
- Create a new keychain, by selecting File > New Keychain and choosing a directory in which to create it. An invisible file will be created in the same directory as the new keychain.
- Delete the invisible file (using the Finder or Terminal).
- Modify the keychain's contents. For example, add a secure note to the keychain, by selecting File > New Secure Note Item. The invisible file will be recreated with the same name.
- Delete the keychain, by selecting File > Delete Keychain > Delete References & Files. The invisible file will be deleted too.
I've verified that this occurs in OS X 10.8 and 10.9.
Update
The same invisible files are created when manipulating keychains using Apple's security
tool in the Terminal:
Create a new keychain. An invisible file is also created.
$ cd ~/Desktop/ $ ls -1a . .. $ /usr/bin/security create-keychain ~/Desktop/Test.keychain $ ls -1a . .. .fl1BCE4B9A Test.keychain
Delete the invisible file.
$ rm .fl1BCE4B9A $ ls -1a . .. Test.keychain
Modify the keychain's contents (eg: by adding an internet password). The invisible file is recreated with the same name.
$ /usr/bin/security add-internet-password -a account -s google.com -w password ~/Desktop/Test.keychain $ ls -1a . .. .fl1BCE4B9A Test.keychain
Delete the keychain. The invisible file is deleted too.
$ /usr/bin/security delete-keychain ~/Desktop/Test.keychain $ ls -1a . ..
Questions
- Why are these invisible files created? What is their purpose?
- What does
fl
mean in the filename? - What are the 8 hex characters in the filename? Some kind of unique ID or hash identifying the keychain?
- Is there a way to prevent these files from being created when keychains are created or modified?