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

Non-root users can change modes for root-owned files and directories #2197

Open
hello-smile6 opened this issue Aug 14, 2023 · 3 comments
Open

Comments

@hello-smile6
Copy link

For some reason, non-root users can change modes on files and directories owned by root (e.g. /root).

Steps to reproduce

  1. Open iSH
  2. Check ls -lahd /root
  3. Add a new user nonroot.
  4. Do su nonroot -c "chmod o+rx /root"
  5. Check ls -lahd /root again.

Full test

ls -lahd /root
adduser -S -D -H nonroot
su nonroot -c "chmod o+rx /root"
ls -lahd /root
deluser nonroot
@hello-smile6
Copy link
Author

It seems like the same issue exists for chown.

@freebrowser1
Copy link

Maybe because this is a prooted / chrooted Linux running inside iOS like Andronix / Termux on Android ?

@hello-smile6
Copy link
Author

@freebrowser1 iSH emulates kernel things, so that shouldn't be the case.

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

No branches or pull requests

2 participants