summaryrefslogtreecommitdiff
path: root/doc/bugs/Git_annex_add_fails_on_read-only_files.mdwn
blob: 50f005a7e4d12eb1db99ce46bd22fa93f0aa4a82 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
### Please describe the problem.

Git annex cannot add/import files in folders without w or x permission

Note that (as stated in the comments) this might not be a bug. The problem might somewhere within Git, because Git does not manage file permissions very well. I was just hoping that I could import large directory trees into git-annex with a simple call to "git annex import"; now it seems I have to fix their permissions first.

### What steps will reproduce the problem?

    $ cd /tmp
    $ mkdir -p folder/subfolder
    $ echo "some text" > folder/subfolder/some_file.txt
    $ chmod 500 folder/subfolder
    $ mkdir annex
    $ cd annex
    $ git init
    $ git annex init "Testing git annex"
    $ git annex import ../folder
    Fails
    $ chmod 600 ../folder/subfolder
    $ git annex import ../folder
    Fails
    $ chmod 700 ../folder/subfolder
    $ git annex import ../folder
    Works. Subfolder now has 755 permissions

### What version of git-annex are you using? On what operating system?

    git-annex version: 4.20131106
    build flags: Assistant Webapp Pairing Testsuite S3 WebDAV Inotify DBus XMPP Feeds Quvi TDFA CryptoHash
    key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SKEIN256E SKEIN512E SHA256 SHA1 SHA512 SHA224 SHA384 SKEIN256 SKEIN512 WORM URL
    remote types: git gcrypt S3 bup directory rsync web webdav glacier hook
    local repository version: 3
    default repository version: 3
    supported repository versions: 3 4
    upgrade supported from repository versions: 0 1 2

    git version 1.8.4.3

> Based on the new example, I don't consider this to be a bug.
> I don't think that `git annex import` should disregard directory
> permissions when importing files from them.
> 
> One very good reason not to
> eg, chmod the directory itself is that if it did, running `git annex
> import` on a git-annex repository would defeat git-annex's own use of
> directory permissions to prevent deletion of the files in that
> repository!
> 
> So, [[done]] --[[Joey]]