WSL icon indicating copy to clipboard operation
WSL copied to clipboard

mv can't rename folder after unzip

Open fdu123 opened this issue 10 years ago • 13 comments

Inside a Linux folder created on /. for example I tried: root@localhost:/# mkdir /mx6 root@localhost:/# cd /mx6 root@localhost:/mx6# cp /mnt/c/buildroot_master.zip . root@localhost:/mx6# unzip buildroot_master.zip .... root@localhost:/mx6# mv buildroot-master buildroot2 mv: cannot move ‘buildroot-master’ to ‘buildroot2’: Permission denied

also if I try to execute a make of my buildroot I failed with patch system that cannot rename some file. Regards

fdu123 avatar Apr 07 '16 18:04 fdu123

@fdu123 Are you trying to build linux image for freescale i.mx6 family processor? ;P I tried build linux Yocto for i.MX UltraLite today #16, but failed :-(

First, did you run bash from windows as administrator? If not, you have privilages to access only files in your windows user directory. Run cmd.exe as administrator and then run bash.

Read more about this here: https://insights.ubuntu.com/2016/03/30/ubuntu-on-windows-the-ubuntu-userspace-for-windows-developers/

You already asked this at #41

patryk9200 avatar Apr 07 '16 18:04 patryk9200

I did try as administrator and I've got the same result. Regards

fdu123 avatar Apr 07 '16 18:04 fdu123

@fdu123 try different path or move file from windows File Explorer to linux rootfs. It's accessible in both ways. You can access linux subsystem from: C:\Users\ YOUR_USER_NAME \AppData\Local\Lxss\rootfs

patryk9200 avatar Apr 07 '16 19:04 patryk9200

Please DO NOT manipulate the Linux filesystem from Windows - this may well cause issues and/or corruption.

It's fine to access your Windows filesystem from Linux, but the other way around is not a supported scenario at this time.

bitcrazed avatar Apr 07 '16 19:04 bitcrazed

@bitcrazed Thanks for info!

patryk9200 avatar Apr 07 '16 19:04 patryk9200

It happens to me for things done in /root (root's home directory) completely inside the Linux environment.

jbaribeault avatar Apr 07 '16 21:04 jbaribeault

I think it has nothing to do with unzip. It's just that you can't use mv to move or rename a directory which is not empty.

root@localhost:~# mkdir a root@localhost:~# mv a b root@localhost:~# mkdir b/aa root@localhost:~# mv b c mv: cannot move ‘b’ to ‘c’: Permission denied

mxalbert1996 avatar Apr 08 '16 18:04 mxalbert1996

@mxalbert1996 I have tried to rename the same folder after a reboot and it works!

fdu123 avatar Apr 08 '16 19:04 fdu123

Known issue. We have a fix in development. From my internal build:

russ@RUSSALEX-BOOK:~$ mkdir a russ@RUSSALEX-BOOK:~$ mv a b russ@RUSSALEX-BOOK:~$ mkdir b/aa russ@RUSSALEX-BOOK:~$ mv b c russ@RUSSALEX-BOOK:~$ ls c aa

russalex avatar Apr 11 '16 17:04 russalex

@russalex is this the same issue as:

root@localhost:/tmp# touch a
root@localhost:/tmp# mv a ~
mv: cannot move 'a' to a subdirectory of itself, '/root/a'

SamSaffron avatar Apr 13 '16 03:04 SamSaffron

@SamSaffron Yep, confirmed that one is fixed is well internally.

russalex avatar Apr 20 '16 00:04 russalex

Though it is the question how can we access updates? Particulary, w/o this one fix subsystem is completely useless - most apt/dpkg operations are highly dependent on config directories mving though it is very hard to get anything useful work.

the-kot avatar Apr 21 '16 21:04 the-kot

Confirmed that this problem is fixed in Insider Preview 14328.

mxalbert1996 avatar Apr 23 '16 13:04 mxalbert1996