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
link system call - Permission denied #837
Comments
@kisik21 SELinux does not allow usage of The only solutions are:
|
> Suspecting that seccomp filter blocks link().
@kisik21 SELinux does not allow usage of `link()` by regular applications.
Is there a way to somehow make not symlinks, but copies with proot?
Or patch an app to do this? (is there a copy syscall? I can't find a
manpage for it for some reason...)
|
If your application will run under proot (with link2symlink), it will see link()'ed file as hardlink.
Termux app is emulator for terminal (console) only. Everything else is use only what is provided by Android. We can't change this !
Linux kernel does not have such syscall (having it is pointless as such feature can be easily implemented on user level). See this to view what's Linux provides: https://filippo.io/linux-syscall-table/ (this is for x86, on ARM/AArch64 it is different). Here I posted solutions for this that will allow to run your application without 'permission denied' error. But if you really want hardlinks, just root your device and disable selinux enforcing. |
Oh, apologies, I meant not a syscall, but a function in general.
What might this mean? seems like this is SIGBUS, but I have no idea what this means. |
@kisik21 Hi! I'm closing this issue as it isn't caused by the Termux app itself. For getting help with proot, either open an issue at https://github.com/termux/proot/issues if you suspect an issue in proot, or ask for help on on the Google+ community or the Gitter chat. |
with android 8(api 26), we have static Path Files.createLink(Path link, Path existing) so the hard link should be available, isn't it? |
Yes, it is available but question not about availability (libc has necessary functions too). Hard links are disallowed by SELinux as part of security hardening (yes, hardlinks provide certain file-related attack vectors).
Another thing is that Termux packages do not use Java API. |
Android 8.0, Termux, Huawei Y6 Prime 2018, link() syscall, link program and everything using link gets permission denied to use the call.
Suspecting that seccomp filter blocks link(). Though an application should crash then...
Filesystem on /data is f2fs. Hardlinks on SD card don't work either, yielding the same Permission denied error.
The text was updated successfully, but these errors were encountered: