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

rsync/cp and ACL/permission problem #543

Closed
sdns575 opened this issue Feb 4, 2021 · 2 comments
Closed

rsync/cp and ACL/permission problem #543

sdns575 opened this issue Feb 4, 2021 · 2 comments
Labels

Comments

@sdns575
Copy link

sdns575 commented Feb 4, 2021

I found a problem when using rsync or cp copying a file from regular directory to the mounted volume of gocryptfs for files with ACL configured. If I try to preserve ACL it preserves ACL but not regular permission.

This happens on Debian testing with gocryptfs 1.8 (tried also the static version).

How to reproduce:

# mkdir src
# echo "1" > src/testfile
# setfacl -m u:daemon:rwx src/testfile 
# ls -l src/testfile 
-rw-rwxr--+ 1 root root 2  4 feb 15.44 src/testfile

# mkdir plain gotest
# gocryptfs -init gotest/
# gocryptfs gotest/ plain/
# cp src/testfile plain/
# ls -l plain/testfile 
-rw-r-xr-- 1 root root 2  4 feb 15.45 plain/testfile   (in this case only regular permissions are preserved)
# getfacl plain/testfile 
file: plain/testfile
owner: root
group: root
user::rw-
group::r-x
other::r--

# rm plain/testfile 

# cp -a src/testfile plain/testfile 
# ls -l plain/testfile 
-rw-------+ 1 root root 2  4 feb 15.44 plain/testfile (in this case only ACL is preserved but not regular permissions)
# getfacl plain/testfile 
file: plain/testfile
owner: root
group: root
user::rw-
user:daemon:rwx
group::r--
mask::rwx
other::r--

If I run cp -a on regular directories permissions and ACL are properly respected. On mounted gocryptfs I need 2 operation.

The same issue is found when using rsync with -A. When using rsync with hardlinks, this causes the problem that rsync find the previous file having different permission and it resync it totally, wasting disk space. In my last backup rsync resynced more then 300GB for the acl problem. Currently running rsync without -A and saving ACL in another way.

@rfjakob
Copy link
Owner

rfjakob commented Feb 7, 2021

Sorry about that, should be fixed now.

However, ACLs are not enforced yet. Until I can unbreak this I have added a warning to the README: 4b4a68e

This is why I suggest to not use ACLs till v2.0 final is released.

@sdns575
Copy link
Author

sdns575 commented Feb 13, 2021

Thank you. I will wait v2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants