termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
31.27k stars 3.32k forks source link

[Bug]:sudo error #3911

Closed blurry-face12 closed 1 month ago

blurry-face12 commented 1 month ago

Problem description

After I installed tsu When using sudo to execute a command, an error message appears as follows: ~$ sudo mount -t tmpfs -o mode=755 tmpfs /sys/fs/cgroup allowed /system/xbin/su: failed to exec PATH=/system/bin: /system/xbin env -i SUDO GID=10123 PREFIX=/data/data/com. ter mux/files/usr SUDO USER=10123 LD_ PRELOAD= /data/data/com.termux/ files/usr 1 lib/ libtermux-exec . so HOME= /data/data/com. termux/ files/home/ . suroot TMPDIR= /data/data/ com . ter mux/files/home/ . suroot/ . tmp ANDROID DATA=/data TERM=x term - 256color ANDROID ROOT=/system PATH=/data/data/com. termux/ files/usr /bin: /system/bin /sys tem/xbin: /sbin: /sbin/bin mount -t tmpfs -o mode=755 tmpfs /sys/fs/ cgroup NO such file or directory

Steps to reproduce the behavior.

pkg install tsu sudo mount -t tmpfs -o mode=755 tmpfs /sys/fs/cgroup

And I have already opened root privileges

What is the expected behavior?

No response

System information

sylirre commented 1 month ago

Termux does not manage /sys/fs/cgroup, just like any other Android OS (Linux) components. Why do you report this as Termux app bug?

Not all devices have /sys/fs/cgroup directory. You may need to

mkdir -p /sys/fs/cgroup

before you can mount a file system there.

See dockerd wrapper script how to set up cgroup mount points: https://github.com/termux/termux-packages/blob/master/root-packages/docker/dockerd.sh

blurry-face12 commented 1 month ago

Termux does not manage /sys/fs/cgroup, just like any other Android OS (Linux) components. Why do you report this as Termux app bug?

Not all devices have /sys/fs/cgroup directory. You may need to

mkdir -p /sys/fs/cgroup

before you can mount a file system there.

See dockerd wrapper script how to set up cgroup mount points: https://github.com/termux/termux-packages/blob/master/root-packages/docker/dockerd.sh

Oh, I made a mistake,The real error prompt is the following one: $ sudo dockerd --iptables=false allowed /system/xbin/su: failed to exec PATH=/system/bin: /system/xbin env -i SUDOGID=10124 PREFIX=/data/data/com.ternux/files/usr SUDO USER=10124 LDPRELOAD=/data/data/com.termux/files/usr /lib/ libtermux-exec.so HOME=/data/data/com.termux/files/home/.suroot TMPDIR= /data/data/com.termux/files/home/ . suroot/ . tmp ANDROID DATA=/data TERM=xterm-256color ANDROID ROOT=/system PATH=/data/data/com.termux/files/usr /bin: /system/bin: /system/xbin: /sbin: /sbin/bin dockerd --iptables=false : No such file or directory

and everytime i use 'sudo', it always prompt similar error. i think it probably termux config wrong, so i report this. may i get this question in the wrong place. i feel sorry about that, it was my first time use github to ask a question.