mv: cannot move 'standard' to 'CLI': Permission denied

0

In Windows 10, I have installed Cygwin. In cmd, I want to move a directory to under another:

>mv standard CLI
mv: cannot move 'standard' to 'CLI': Permission denied

I ran the mv command while a pdf file under standard was opened by a pdf viewing program. Then the mv command was hang, and I closed the pdf viewing program, but mv continued to hang.

I closed the cmd window, and I still couldn't move the directory in either cmd or folder explorer.

Restarting Windows doesn't solve the problem.

How can I solve the program?

Tim

Posted 2017-01-26T17:09:39.407

Reputation: 12 647

permissions issue would be my guess. try running cmd as admin – Tim – 2017-01-26T17:27:20.213

Can you create a new folder in CLI? – AFH – 2017-01-26T18:04:22.817

Answers

1

Try to run PDF viewer program again and open any PDF file outside of that standard folder. Many programs keep continue holding access to the last opened file even it was close (may be for the purpose to show it in recent files, or indexing...). You may try also to spot this issue with help of ProcessExplorer that can show opened file descriptors for particular program.

Alex

Posted 2017-01-26T17:09:39.407

Reputation: 5 606

Thanks. I have tried ProcessExplorer. But how can I identify the process which uses the specific pdf file? – Tim – 2017-01-26T17:47:30.953

Use the "Find handles" option. – user1686 – 2017-01-26T17:53:03.083

Don't look for the PDF: look for the folder name - there may be other processes that are using the folder, eg as working directory. – AFH – 2017-01-26T18:03:16.640

Type the path to that standard folder in "Find handles" in ProcessExplorer. (path to that folder could be partial. ) It should list processes that took that folder – Alex – 2017-01-26T18:03:17.927