summaryrefslogtreecommitdiff
path: root/doc/todo/windows_git-annex_service.mdwn
blob: 5a7e917528e99ae192e7e53171f6546794fe5249 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## git-annex as service on windows

Use nssm to run git-annex as a service. Will need to include it in the
git-annex bundle.

Problem: nssm runs git-annex as a service as a LocalService user. (Or some
similar user.) This leads to permission problems, when the normal user
tries to write to its directory.

Solution: Make `git-annex mkservice $repo` command (only avilable on
Windows) that does:

1. git -c core.sharedRepository=true init $repo
2. cd $repo; git annex init
4. chmod 777 -R $repo
5. Add $repo to C:\.config\git-annex\autostart
6. If git-annex service does not yet exist in nssm, set it up and start it.

**Problem**: With 2 users writing to one repository, files and subdirs
will end up owned by git-annex or by the desktop user, and the other user 
won't be able to eg, edit a file or remove a file from a directory.

Make git-annex read `C:\.config\git-annex\autostart`
on Windows, in addition to the one in $HOME. This way, `git annex assistant
--autostart` and `git annex webapp` will use it, no matter which user.

WIP git branch: `winservice`

> I am calling this [[done]], it's not done using a service, but it works.
> --[[Joey]]