permission denied termux что делать
permission denied sudo tsu #748
Comments
ghost commented Jun 30, 2018
My phone is rooted but can’t access root on termux
tsu
bash: /data/data/com.termux/files/usr/bin/applets/ls: Permission denied
$ sudo su
bash: /data/data/com.termux/files/usr/bin/applets/ls: Permission d
The text was updated successfully, but these errors were encountered:
Grimler91 commented Jun 30, 2018
ghost commented Jun 30, 2018
setuidroot commented Jul 6, 2018
Are you still having this issue? What root management app are you using? (Magisk, SuperSU. hopefully not KingRoot, etc.)
Invoking su should give you a root shell on the phone, but without access to Tmux packages (that’s what tsu is for.) If su says permission denied, then your root control app isn’t allowing root access to Termux. I recommend Magisk. it’s open source, kept up-to-date and easily flashed from recovery (like TWRP.)
Are you on old Android ≤5? If so, tsu has issues with LD_LIBRARY_PATH; but su will always work if you have correctly rooted your device. I’m betting your root management app is not allowing termux root access. if you’re using KingRoot, they block termux to make it harder for you to remove kingroot (as it’s spyware.) Check your root management app to make sure it isn’t kingroot and is allowing Termux root access.
xeffyr commented Jul 6, 2018
@setuidroot Most android devices (without custom rom installed) have a such thing as SELinux. It can restrict permissions for all users including root. So:
Are you still having this issue?
Run apt install and you will mess up all selabels (not only ownership) and will get permission denied when accessing files.
Solutions for this are:
Termux does not support Android less than 5. Even if user will be able to install applicantion, cli programs will not work.
setuidroot commented Jul 9, 2018
As far as SELinux. that gets messy. You can disable it, like you said; but I wouldn’t normally recommend people run without SELinux unless they really know what they’re doing. That opens the possibly for any app to gain access outside of it’s allowed permissions. I’ve never run into termux issues with SELinux unless doing things like packet sniffing/injection. But I realize this is highly device and OS dependent.
I wasn’t aware termux doesn’t work on android less than 5 (I dont have any devices less than 5.) I have a bootloader locked galaxy s5 running android 5 that has issues with tsu and LD_LIBRARY_PATH; Grimler91 has some good insight on that here: termux/termux-packages#2047
I don’t know what OP’s issue is. if he can get root with su, but not tsu? Or no root at all? If he replies with more info maybe we can help him further. Either way, I appreciate all you guys that contribute so much to termux 🙂
tsu permission denied when executing command #2047
Comments
rafinetiz commented Jan 18, 2018
I already granted supersu permission..
As you can see in images.
Only a few commands can be run.
Termux ver. : 0.59
Android ver. : 5.1.1
Root type: Systemless root
The text was updated successfully, but these errors were encountered:
xeffyr commented Jan 18, 2018 •
rafinetiz commented Jan 18, 2018
So, how to fix this?
Grimler91 commented Jan 18, 2018 •
I’ve experienced this on several devices/ROMs. I use this script on my tablet instead of tsu:
Replace /system/xbin/su with the path to your su binary obviously.
Haven’t investigated further.
(from tsu: bash: /system/bin/getenforce: Permission denied )
xeffyr commented Jan 18, 2018
This may be the source of ‘permission denied’ error. It is possible to restrict permissions of root user with selinux policy.
Atavic commented Jan 18, 2018
If Grimler91 solution works, that’s a 👍
Sometimes Custom ROM devs tell people to change SELinux options to Permissive Mode and that’s really a bad idea.
Grimler91 commented Jan 18, 2018
@Atavic I don’t think it’s the proper way to solve the problem though. I’ve revised the script a bit, no need to export vars before (and LD_LIBRARY_PATH wasn’t preserved for some reason).
Grimler91 commented Jan 19, 2018
I believe it would better to move this issue to https://github.com/cswl/tsu
Harshiv-Patel commented Jul 26, 2018
I face a «permission denied» issue as well:
`$ tsu
$ ls
bash: /data/data/com.termux/files/usr/bin/ls: Permission denied
$ env
bash: /data/data/com.termux/files/usr/bin/env: Permission denied
The Shell prompt is ( possibly other environment variables too) preserved, with color.
Rooted with Magisk v16.
Running Android Lollipop 5.1.1
CPU arch : armv7l.
rafinetiz commented Jul 26, 2018
@Harshiv-Patel show the output of /system/bin/getenforce
helmut72 commented Aug 18, 2018
$ /system/bin/getenforce
CANNOT LINK EXECUTABLE «/system/bin/getenforce»: cannot locate symbol «OpenSSL_add_all_algorithms» referenced by «/system/lib64/libselinux.so».
xeffyr commented Aug 18, 2018
@helmut72 Use LD_LIBRARY_PATH= /system/bin/getenforce
helmut72 commented Aug 18, 2018
Thanks, getenforce shows now a proper output. But tsu still doesn’t work.
$ LD_LIBRARY_PATH= /system/bin/getenforce
Enforcing
$ tsu
/data/data/com.termux/files/usr/bin/tsu: 139: exec: : Permission denied
Grimler91 commented Aug 18, 2018
@helmut72 update your magisk, if you are using magisk
Harshiv-Patel commented Aug 20, 2018
I am running on stock ROM of Samsung SM-E700H device (arm) if that could help.
Rooted with Magisk v16
Grimler91 commented Aug 20, 2018
@Harshiv-Patel Magisk v16.0 was released in February. Update your magisk.
Harshiv-Patel commented Aug 20, 2018 •
AFAIK v16.00 is latest stable version of Magisk. Magisk manager doesn’t show any other updates.
Grimler91 commented Aug 20, 2018
Weird, there are newer releases available at the github page at least.
Harshiv-Patel commented Aug 20, 2018
Updated Magisk to beta v16.71 through Magisk Manager (which I didn’t really expect to fix the issue). No change is observed. Issue persists.
Grimler91 commented Aug 20, 2018
@Harshiv-Patel alright, thanks for checking!
rafinetiz commented Aug 20, 2018 •
@xeffyr
This may be the source of ‘permission denied’ error. It is possible to restrict permissions of root user with selinux policy.
He’s right, you all need to change the current state of Enforcing status to Permissive Mode.
And now tsu is work perfectly in my device after i changing Enforcing status to Permissive Mode.
Of course i’m using a custom rom to enabled this feature.
haxersworld commented Sep 27, 2018
I’m thinking this could be a kernel issue on our phones Sammy S7 here 8.0 with noway to setenforce to permissive might try a new rom and kernel. I really don’t want to however this is my last resort in trying to correct the error 32/64 bit to unset LD_PRELOAD works = permission Denied.
ghost commented Jan 17, 2019
ghost commented Jan 17, 2019
also we need to find a work around this worked fine before the Oreo update ( 8.1.1 ). I read an portal post on XDA developers it said that Samsung was trying to patch spector and meltdown and downgrading is not possable I have tried
Grimler91 commented Jan 17, 2019
ghost commented Jan 19, 2019
My issue is the program gets killed by something
xeffyr commented Jan 24, 2019
@Austcool-Walker Sorry, but I don’t have this file on my local storage.
Fix your link.
ghost commented Jan 24, 2019 •
ghost commented Jan 24, 2019
It gets killed on the SM-T380 I’m rooted with magisk
ghost commented Feb 6, 2019
For me the problem is solved my issues were because of Samsung Defex security in the kernel going to https://opensource.samsung.com and requesting the kernel source code and building with the Defex disabled in defconfig fixed my problems
WonderKruger commented Aug 8, 2020
Solved this problem for me
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Bash: /data/data/com.termux/files/usr/bin/applets/ls: Permission denied #269
Comments
badrshah commented May 28, 2019
Despite having a rooted device this is what termux shows me.
Device: Samsung’s Galaxy J5 SM-J500H
Android version: 6.0.1
Root type: system less root (SuperSU)
The text was updated successfully, but these errors were encountered:
Grimler91 commented May 28, 2019
badrshah commented May 28, 2019
Grimler91 commented May 28, 2019
Then I don’t really know, might be something weird with your superSU version
badrshah commented May 28, 2019
Grimler91 commented May 28, 2019
Well we can’t do anything about superSU, that’s not a termux-package, and tsu is hosted in a separate repo
Seems like there are some similar reports over at the tsu repo: cswl/tsu#42, cswl/tsu#35, subscribe/comment on them and add your output of termux-info
xeffyr commented May 28, 2019
Grimler91 commented May 28, 2019
Hm, I can reproduce the problem on my android 9 phone, but I would guess that it is some problem with the SU version, or selinux (but not likely since OP has problems on android 6).
The permission denied only happens from a termux shell, running termux binaries from a /system/bin/sh shell works fine (so executing /sbin/su and then /data/data/com.termux/files/usr/bin/ls works fine but /sbin/su and then /data/data/com.termux/files/usr/bin/bash followed by /data/data/com.termux/files/usr/bin/ls gives permission denied)
xeffyr commented May 28, 2019
/system/bin/am: Permission denied #26
Comments
sedatsevgili commented Jul 4, 2016
I am using an lg g3 and not any custom rom and i did not rooted my device.
I installed termux-api app and updated and upgraded my apt too.
However when i want to call any termux api command in the termux terminal, i see this error message:
/data/data/com.termux/files/usr/bin/am: 3: exec: /system/bin/am: Permission denied
The text was updated successfully, but these errors were encountered:
fornwall commented Jul 4, 2016
Can you paste the output of running:
Also, could you paste the output of
sedatsevgili commented Jul 4, 2016
And the second one is: /data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets
fornwall commented Jul 4, 2016
What is the output of running
sedatsevgili commented Jul 4, 2016
-bash: /system/bin/am: /system/bin/sh: bad interpreter: Permission denied
fornwall commented Jul 4, 2016
sedatsevgili commented Jul 4, 2016
fornwall commented Jul 4, 2016
Hm, not sure what the problem is here. Could you paste the output from running
sedatsevgili commented Jul 5, 2016
Script to start «am» on the device, which has a very rudimentary
shell.
saramasood111 commented Jul 24, 2016
William8915 commented Mar 22, 2017 •
Temporary solution: make a copy of /system/bin/am manually (through adb or other methods), and adjust /data/data/com.termux/files/usr/bin/am accordingly.
Tested on LG G3 Stylus (D690)
sedatsevgili commented Jul 27, 2017
posalusa24 commented Oct 19, 2017
Try changing selinux mode to permissive. It worked for me.
posalusa24 commented Oct 19, 2017
you can use an app like selinux mode changer to change modes. try googling it
posalusa24 commented Oct 19, 2017
by the way selinux mode status is under Settings>About Phone
sedatsevgili commented Oct 19, 2017
@posalusa24 Thanks, i will try asap
sedatsevgili commented Dec 11, 2017
Issue is still alive. I think i have to change my device to use the api 🙁
Btw, i don’t want to root.
sedatsevgili commented Dec 18, 2017
Well, i changed my device. And it works right now 🙂
rootkittt commented May 4, 2018
Hi, ive got any problems to run “su“.
Ive tried it with “tsu“ and i cannot use “su“
My phone is rooted by chainfire super su.
But i always get this error. How can i fix it?
Permission denied #19
Comments
salvomic commented Apr 5, 2018
The text was updated successfully, but these errors were encountered:
cswl commented Apr 7, 2018 •
Which su are you using.
salvomic commented Apr 7, 2018
the output is:
/data/data/com.termux/files/usr/bin/tsu
cswl commented Apr 7, 2018
That’s just the output for which.. bash didn’t run it..
I will push a debug flag. but for now.. could you run.
salvomic commented Apr 7, 2018
thanks!
I get the output in the attached image.
cswl commented Apr 7, 2018
From the output it seems it couldnt find the su binary..
Are you rooted?
Which superuser are you using.. SuperSU or your ROM
salvomic commented Apr 7, 2018
no, I’m operating in a Huawei Mediapad M5 that apparently is not «root-able» (or not so easy «root-able»).
cswl commented Apr 7, 2018
tsu doesn’t root your device. It’s just makes using su friendlier in Termux.
Although I think the error message could be improved so gonna leave this issue open,
salvomic commented Apr 7, 2018
zArubaru commented May 1, 2018
Hey, having similar issues, though my device has been rooted with SuperSU, here’s some useful output:
cswl commented May 2, 2018
Looks like youring using Systemless Supersu.
And root isn’t able to launch termux binaries..
salvomic commented May 2, 2018
rootkittt commented May 3, 2018
Hey if i run tsu i get the same “permission denied“ error
Search packages: pkg search
Install a package: pkg install
Upgrade packages: pkg upgrade
Learn more: pkg help
$ tsu
apt-get update
bash: /data/data/com.termux/files/usr/bin/apt-get: Permission denied
clear
bash: /data/data/com.termux/files/usr/bin/clear: Permission denied
bash: /data/data/com.termux/files/usr/bin/applets/ls: Permission denied
Ive got superuser on my device and it is rooted. Ive got the same problems with “su“
It wont work correctly
cswl commented May 20, 2018
Which su are you using.. and which Android version..
Sounds like an issue with permissions
0xriki commented Jun 20, 2018
Usage#2: su uid COMMAND.
$
Harshiv-Patel commented Jul 26, 2018
I face a «permission denied» issue as well:
`$ tsu
$ ls
bash: /data/data/com.termux/files/usr/bin/ls: Permission denied
$ env
bash: /data/data/com.termux/files/usr/bin/env: Permission denied
The Shell prompt is ( possibly other environment variables too) preserved, with color.
Rooted with Magisk v16.
Running Android Lollipop 5.1.1
CPU arch : armv7l.
haxersworld commented Sep 27, 2018
Has this issue have anything to do with SElinux mode. And has this issue been resolved?
Harshiv-Patel commented Sep 27, 2018
The issue has not been resolved for me so far. Have been trying to build a permissive kernel (for Sm-E700H)but not successful yet.
rootkittt commented Sep 27, 2018
Hey ive got still the same problem.my phone is rooted with twrp and super su from chainfire. Ive tried to install ternux-sudo but its not working. Then ive tried to install tsu. But its not working as well. It says permission denied.
S0U1SB4N3 commented Nov 2, 2018
cswl commented Nov 23, 2018
Closing in favor of: #30
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.