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

mv does not work on binded folder #211

Open
erdnaxeli opened this issue Feb 5, 2020 · 9 comments
Open

mv does not work on binded folder #211

erdnaxeli opened this issue Feb 5, 2020 · 9 comments
Labels

Comments

@erdnaxeli
Copy link

Hi,

I use a very old Linux (3.14) on a very old Debian (7) for… some reasons. I am not root on it. I expected to use proot to be able to do thing on it (every package is years outdated), but it seems that mv does not work.

Expected Behavior

mv work

Actual Behavior

mv does not.

Steps to Reproduce the Problem

  1. proot -b somedir:/somedir
  2. touch a && mv a /somedir

Specifications

  • Proot/Care version: v5.1.0-526b6f0a
  • Kernel version: 3.14 (that's probably the problem :D)
  • Host distribution: Debian 7
  • Guest distribution: same

Command Output

mv: cannot move 'a' to '/somedir': No such file or directory
@breaktime1903
Copy link

Are you joking? You are using Debian 7 which is very old. You had better upgrade the system to the latest version.

@erdnaxeli
Copy link
Author

That's sadly not an option.

@oxr463
Copy link
Collaborator

oxr463 commented Feb 12, 2020

I don't think Debian 7 is too old for PRoot. Especially since there are some issues with running on newer kernels at the moment.

I am, however, having trouble finding an image to use for creating a virtual machine for testing.

@breaktime1903
Copy link

However,it seemed that the kernel is too old,or the folder is read-only,try to use chmod at first.(I'm sorry that I can't speak English well.)

@7v0lk0v
Copy link

7v0lk0v commented Mar 25, 2020

I have the same issue, it seems one of the paths must be absolute for it work:

+root@voidvm ~ # cd /usr/bin
mv+root@voidvm /usr/bin # mv fmt moo
mv: cannot move 'fmt' to 'moo': No such file or directory
+(1) root@voidvm /usr/bin # mv /usr/bin/fmt moo
+root@voidvm /usr/bin # mv moo fmt
mv: cannot move 'moo' to 'fmt': No such file or directory
+(1) root@voidvm /usr/bin # mv moo /usr/bin/fmt
+root@voidvm /usr/bin # mv fmt /usr/bin/moo
+root@voidvm /usr/bin # mv moo fmt
mv: cannot move 'moo' to 'fmt': No such file or directory
+(1) root@voidvm /usr/bin # mv /usr/bin/moo fmt
+root@voidvm /usr/bin # mv fmt /usr/
+root@voidvm /usr/bin # mv /usr/fmt .

The last couple of lines reproduce OP's commands which works fine for me - so either OP made a typo or I have a closely related but not identical bug.

This is on a very recent Void Linux install inside VirtualBox using qemu-arm layer:

+pechkin ~/.../repos/packer-rpi % uname -a
Linux voidvm 5.2.14_1 #1 SMP PREEMPT Tue Sep 10 12:13:45 UTC 2019 armv7l GNU/Linux
+pechkin ~/.../repos/packer-rpi % proot --version
 _____ _____              ___
|  __ \  __ \_____  _____|   |_
|   __/     /  _  \/  _  \    _|
|__|  |__|__\_____/\_____/\____| 5.1.0

built-in accelerators: process_vm = yes, seccomp_filter = no

Visit http://proot.me for help, bug reports, suggestions, patchs, ...
Copyright (C) 2014 STMicroelectronics, licensed under GPL v2 or later.

This is causing an issue updating system packages, which then leaves my system in a broken state:

ca-certificates-20180409_2: updating to 20190110_1 ...
mv: cannot move 'etc/ca-certificates.conf' to 'etc/ca-certificates.conf.tmp': No such file or directory
mv: cannot stat 'etc/ca-certificates.conf.tmp': No such file or directory

Edit: to clarify, this happens even on the rootfs bind, I'm not even using the -S or -R flags, just binding the /dev /sys /proc paths, nothing else.

@erdnaxeli
Copy link
Author

The last couple of lines reproduce OP's commands which works fine for me - so either OP made a typo or I have a closely related but not identical bug.

I just checked it again, i did not made a type :p. I tried with the absolute path for the file to move, I got the same error.

@7v0lk0v
Copy link

7v0lk0v commented Mar 26, 2020

Additionally I just found that globs don't work either:

$ ls -a
.             .bashrc     .fossil          .grepexclude  .mrtrust       .ssh             .vimperatorrc
..            .bin        .fossil-settings  .hgrc        .ondirrc       .ssh-ident       .xinitrc
.SpaceVim.d    .bspwm      .fslckout        .inputrc     .pentadactylrc  .sxhkd           .xprofile
.Xresources    .cache      .fzf             .jimrc       .qtile         .tmux-acme.conf   .xsession
.base16_theme  .config     .gitconfig       .kbd         .shrc          .tmux.conf       .zshrc
.bash_logout   .emacs.d     .gitexclude       .local       .shrc.mac      .tmux.conf.local
.bash_profile  .fontconfig  .gnupg           .mkshrc      .spacemacs.d    .tool-versions
$ ls -a .*
ls: cannot access '.*': No such file or directory
$ touch moo
$ ls moo
moo
$ ls
moo
$ ls * 
ls: cannot access '*': No such file or directory

@oxr463
Copy link
Collaborator

oxr463 commented Oct 4, 2021

@erdnaxeli can you test again using either the v5.2.0 release or on the master branch?

@erdnaxeli
Copy link
Author

It's not better :(

$ ./proot-v5.2.0-x86_64-static -b somedir:/somedir
$ touch /somedir/a
$ touch b
$ mv b /somedir
mv: cannot move `b' to `/somedir/b': No such file or directory

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

No branches or pull requests

4 participants