summaryrefslogtreecommitdiff
path: root/Mounting-on-login-for-OSX.md
diff options
context:
space:
mode:
authorJürgen Hörmann2023-02-02 10:28:30 +0100
committerJürgen Hörmann2023-02-02 10:28:30 +0100
commit0cba1c669f3219173e78f35e58153559adf05a71 (patch)
tree8c3b9f7455f767f79814ef2fe8f7acebfeaac6a6 /Mounting-on-login-for-OSX.md
parent9fac57260bceb4ff08cd1b06f2768f504ded690d (diff)
Adding how to auto-mount in OSX
Diffstat (limited to 'Mounting-on-login-for-OSX.md')
-rw-r--r--Mounting-on-login-for-OSX.md48
1 files changed, 48 insertions, 0 deletions
diff --git a/Mounting-on-login-for-OSX.md b/Mounting-on-login-for-OSX.md
new file mode 100644
index 0000000..ff383d1
--- /dev/null
+++ b/Mounting-on-login-for-OSX.md
@@ -0,0 +1,48 @@
+## Store your Password in the OSX Keychain
+
+Open the Terminal app and enter
+```shell
+security add-generic-password -a ${USER} -s gocryptfs -w
+```
+Type or paste in your gocryptfs password when prompted.
+
+Now launch the text editor of your choice like Textmate and copy and paste this code:
+```xml
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+<!-- <key>StandardErrorPath</key>
+ <string>/Users/your-username/debug.log</string>
+ <key>Debug</key>
+ <true/>
+-->
+ <key>KeepAlive</key>
+ <dict>
+ <key>Crashed</key>
+ <true/>
+ </dict>
+ <key>Label</key>
+ <string>gocryptfs.start</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/usr/local/bin/gocryptfs</string>
+ <string>--extpass=&quot;security find-generic-password -s gocryptfs -w&quot;</string>
+ <string>/Users/your-username/path/to/encrypted/folder</string>
+ <string>/Users/your-username/path/to/plain/folder</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+</dict>
+</plist>
+```
+
+You need to replace some values:
+* `your-username`: Replace this with your real username. If you are unsure what your username is, open the Terminal app and type `echo $USER` and hit enter. The Terminal will output your username.
+* `/path/to/encrypted/folder`: Replace this with the real location of your encrypted files. I assume here that your files are located somewhere in the user's home directory. If your files are located for instance on an external drive please replace the full path `/Users/your-username/path/to/encrypted/folder`
+* `/path/to/plain/folder`: Similar to the encrypted folder you have to enter the location of the folder where your unencrypted files should be shown.
+
+Save the editor content as a *.plist file under `~/Library/LaunchAgents/gocryptfs.plist`
+
+Log out and log in again to see if it works.
+If you have issues getting it working, you can remove the comments (`<!--` and `-->`) from debugging section. Don't forget to adjust the location of the debug log file. If you now re-login you will get some information in the log file that might help to resolve your issues.