ecryptfs team mailing list archive
-
ecryptfs team
-
Mailing list archive
-
Message #01118
[Bug 380073] Re: Error reading symlinks in an ecryptfs filesystem
I can confirm this problem on plain old ext3.
whenever git has to work on ecryptfs, symlinks fail.
I cannot add new symlinks, and all old ones(when I clone an existing repo) permanently stay in a 'modified' state.
Linux mathijs 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 22:12:12 UTC 2009 x86_64 GNU/Linux
Ubuntu 9.04
mathijs@mathijs:~$ mkdir gittest
mathijs@mathijs:~$ cd gittest/
mathijs@mathijs:~/gittest$ git init
Initialized empty Git repository in /home/mathijs/gittest/.git/
mathijs@mathijs:()~/gittest$ echo "test" > README
mathijs@mathijs:()~/gittest$ git add README
mathijs@mathijs:()~/gittest$ git commit -m 'readme'
Created initial commit bd94b7a: readme
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 README
mathijs@mathijs:(master)~/gittest$ ln -s README somelink
mathijs@mathijs:(master)~/gittest$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# somelink
nothing added to commit but untracked files present (use "git add" to track)
mathijs@mathijs:(master)~/gittest$ git add somelink
error: readlink("somelink"): Invalid argument
error: unable to index file somelink
fatal: adding files failed
--
Error reading symlinks in an ecryptfs filesystem
https://bugs.launchpad.net/bugs/380073
You received this bug notification because you are a member of eCryptfs,
which is subscribed to ecryptfs-utils in ubuntu.
Status in “ecryptfs-utils” package in Ubuntu: New
Bug description:
Binary package hint: libecryptfs0
The problem shows up in Git, though I don't think it is a Git problem (though I could be wrong). The issue is that when Git tries to read a symlink on an eCryptfs filesystem, it fails with:
error: readlink("link-to-file"): Invalid argument
error: unable to index file link-to-file
I can confirm that it works on my ext4 root partition, and it has worked in the past, so I'm fairly sure it is an eCryptfs issue.
I have attached a script which demonstrates the problem. It creates a folder "test" in the current directory, initiates a git repository, adds a file and a link to that file. Here is what the output looks like for me:
(/ is an ext4 partition and my home folder is eCryptfs)
$ cd /tmp
$ sh ~/test-script.sh
Initialized empty Git repository in /tmp/test/.git/
Created initial commit f35f3e0: Commit file
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file
Created commit 3ffda66: commit link
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 120000 link-to-file
$ cd ~/
$ sh ~/test-script.sh
Created initial commit 070bd2f: Commit file
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file
error: readlink("link-to-file"): Invalid argument
error: unable to index file link-to-file
fatal: adding files failed
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# link-to-file
nothing added to commit but untracked files present (use "git add" to track)
Some system info:
$ uname -a
Linux priscilla 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64 GNU/Linux
$ cat /etc/issue
Ubuntu 9.04 \n \l
References