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

Support recursion for applyto() #22

Open
exploide opened this issue Aug 16, 2023 · 1 comment
Open

Support recursion for applyto() #22

exploide opened this issue Aug 16, 2023 · 1 comment

Comments

@exploide
Copy link

It would be useful if applyto() could take an optional recursive=True parameter when applying an ACL to a directory.

This could make the functionality of setfacl -R available to pylibacl.

A further option would be needed to differentiate whether following symlinks or not (setfacl -R -L/-P).

@iustin
Copy link
Owner

iustin commented Nov 4, 2023

Hi, and thanks for the issue.

The problem is that the library is a) designed to mimic the C library, not the user space tools, and b) the library is written purely in C, as a thin wrapper over the C library. Implementing this feature in the C version would likely be too complex.

What could be done is to move the C library into an internal one, and write a Python "front-end" that would re-export the C library methods, either as-is, or in the case you suggest, via extended functionality. But that's a bit of a larger task - I need to think if it makes sense.

If you can send a pull request, I'd be happy to discuss and potentially merge.

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

No branches or pull requests

2 participants