proot
proot copied to clipboard
mv does not work on binded folder
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
- proot -b somedir:/somedir
- 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
Are you joking? You are using Debian 7 which is very old. You had better upgrade the system to the latest version.
That's sadly not an option.
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.
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.)
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.
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.
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
@erdnaxeli can you test again using either the v5.2.0 release or on the master branch?
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