summaryrefslogtreecommitdiff
path: root/doc/tips
diff options
context:
space:
mode:
authorGravatar https://id.koumbit.net/anarcat <https://id.koumbit.net/anarcat@web>2013-09-10 23:13:59 +0000
committerGravatar admin <admin@branchable.com>2013-09-10 23:13:59 +0000
commitb238fb20d65b1e352a8c097b966fc06e397be686 (patch)
treed6edbf05369c11afaa737f3ed41584e04fc06737 /doc/tips
parentbebc2b40a5358dcadfe544caeac6488fa12e67ef (diff)
some classic shared repo configuration that is way too relevant to leave out of git-annex's documentation
Diffstat (limited to 'doc/tips')
-rw-r--r--doc/tips/shared_git_annex_directory_between_multiple_users.mdwn32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/tips/shared_git_annex_directory_between_multiple_users.mdwn b/doc/tips/shared_git_annex_directory_between_multiple_users.mdwn
new file mode 100644
index 000000000..5b240839e
--- /dev/null
+++ b/doc/tips/shared_git_annex_directory_between_multiple_users.mdwn
@@ -0,0 +1,32 @@
+Scenario
+========
+
+You have a server where you want to welcome other people to push files, say for a family photo album. People have their own user account, so by default they will not be able to read/write from each other's repositories, due to git-annex strict restrictions.
+
+Solution
+========
+
+Setup a shared git repository:
+
+ git init shared ; cd shared # you can also do this on an existing git annex repo
+ git config core.sharedrepository group
+ chmod g+rwX -R .
+ chown -R :media .
+
+The idea here is to use the new (since [[news/version 4.20130909]]) support for git's `sharedRepository` configuration and restrict access to a specific group (instead of the default, a single user). You can also this to make the files accessible to all users on the system:
+
+ git config core.sharedrepository world
+ chmod a+rwX -R .
+
+This will make sure that you anyone can operate that git annex repository remotely.
+
+Third party applications
+------------------------
+
+Now if another application that is not aware of git's `sharedRepository` configuration (say a [[bittorrent]] daemon) writes files there, you may want to make sure that the files created are also writable by everyone. This is more tricky, but one way of doing this is with the [[!wikipedia setgid]] bit:
+
+ find -type d -exec chmod g+s {} \;
+
+You will also need to start the process with a proper [[!wikipedia umask]] (`002` instead of `022`).
+
+See also [[tips/setup a public repository on a web site]].