Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended attributes on symlinks cannot be read on decrypted directories #283

dinoboy197 opened this issue Feb 10, 2017 · 1 comment


None yet
2 participants
Copy link

commented Feb 10, 2017

Using the latest release as of the filing of this issue (1.9.1), If a symlink to a regular file exists in a decrypted directory, the extended attributes on the target of the link cannot be read.

Steps to reproduce:

# verify version
encfs --version

# remove old runs
rm -rf /tmp/source
fusermount -u /tmp/decrypted
fusermount -u /tmp/encrypted

# setup - create a new directory with a symlink to the /bin/tar utility
mkdir -p /tmp/source /tmp/encrypted /tmp/decrypted
ls -al /bin/tar
ln -s /bin/tar /tmp/source

# encrypt /tmp/source into /tmp/encrypted
encfs --standard --reverse -o ro /tmp/source /tmp/encrypted

# decrypt /tmp/encrypted into /tmp/decrypted
ENCFS6_CONFIG=/tmp/source/.encfs6.xml encfs --standard /tmp/encrypted /tmp/decrypted

echo "Testing:"
echo "First, try rsync from decrypted directory to another location without xattrs."
rsync -avHA /tmp/decrypted/ /tmp/copy1/
echo "Works properly; exit code is $?"

echo "Now, try rsync from decrypted directory to another location with xattrs."
rsync -avHAX /tmp/decrypted/ /tmp/copy2/
echo "Fails; exit code is $?"

echo "And, just to be sure that copying xattrs from original source works ok..."
rsync -avHAX /tmp/source/ /tmp/copy3/
echo "Works properly; exit code is $?"

This comment has been minimized.

Copy link

commented Feb 11, 2017

That seems to be the same problem as my report #247 . When a symlink pointing to a non existent file (there is not /bin/tar in the encrypted filesystem), one gets an error when trying to get the extended attributes of the symlink (because encfs uses a system call to get the attributes of the target file, not of the symlink itself).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.