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

'cp' doesn't keep destination permission #79

Open
fulalas opened this issue Nov 21, 2023 · 1 comment
Open

'cp' doesn't keep destination permission #79

fulalas opened this issue Nov 21, 2023 · 1 comment

Comments

@fulalas
Copy link

fulalas commented Nov 21, 2023

How to replicate:

  1. have a 644 permission test.txt file in /etc/xdg/autostart
  2. have a 755 permission test.txt file in /tmp
  3. call busybox using: busybox cp /tmp/test.txt /etc/xdg/autostart

Expected behavior: the new file should replace the original one and keep the original (destiny) permission.

Current behavior: the new file replaces the original one but it also replaces its permission, and that's not the behavior of cp from coreutils (https://www.gnu.org/software/coreutils/), which requires additional parameters (--preserve=all) to achieve that.

I'm using busybox 1.36.1

P.S.: is busybox bug track working? I reported this issue there one week ago and didn't see any reply.

@ljf75
Copy link

ljf75 commented Dec 1, 2023

Who can tell me cal cmd's source code?

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