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

Can't create '\\\\?\\C:\\usr\\bin\\free.exe' #99

Open
john-peterson opened this issue Jun 29, 2023 · 2 comments
Open

Can't create '\\\\?\\C:\\usr\\bin\\free.exe' #99

john-peterson opened this issue Jun 29, 2023 · 2 comments

Comments

@john-peterson
Copy link

john-peterson commented Jun 29, 2023

I tried to remedy the famous NULL SID with

sed -i -e 's/user/user,noacl,exec/g' /etc/fstab

Now all installations seemingly point to the wrong path. The cygwin prefix is missing. My root is c:/cygwin

wget https://raw.githubusercontent.com/kou1okada/apt-cyg/master/apt-cyg
install apt-cyg /bin

apt-cyg install procps-ng
...
ash_check: sha512sum: procps-ng-4.0.3-1.tar.zst: OK
Unpacking...
x usr/bin/free.exe: Can't create '\\\\?\\C:\\usr\\bin\\free.exe'
x usr/bin/pgrep.exe: Can't create '\\\\?\\C:\\usr\\bin\\pgrep.exe'                                     
x usr/bin/pidof.exe: Can't create '\\\\?\\C:\\usr\\bin\\pidof.exe'
x usr/bin/pkill.exe: Can't create '\\\\?\\C:\\usr\\bin\\pkill.exe'
x usr/bin/pmap.exe: Can't create '\\\\?\\C:\\usr\\bin\\pmap.exe'
...
...
x usr/share/man/uk/man8/vmstat.8.gz: Can't create '\\\\?\\C:\\usr\\share\\man\\uk\\man8\\vmstat.8.gz'     
tar.exe: Error exit delayed from previous errors.    
Package procps-ng requires the following packages, installing:
...

This is no problems

touch /usr/bin/test

dev@win ~
$ ls /cygdrive/c/cygwin/bin/test
/cygdrive/c/cygwin/bin/test

mount
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)

I tried

apt-cyg repair-acl

I believe fstab is restored after this failure maybe it's still wrong??

cat /etc/fstab
# This is default anyway:
none /cygdrive cygdrive binary,posix=0,user 0 0

How do I restore my cygwin prefix to c:/cygwin so it doesn't try to unpack everything in c:/

It already is correct in the registry

C:\Users\dev>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup /v rootdir

HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
    rootdir    REG_SZ    c:\cygwin

Now a different error don't know why

apt-cyg install tree
hash_check: sha512sum: tree-1.7.0-1.tar.xz: OK
Unpacking...

It just hangs at unpacking. Stalls endlessly. Is it the install command that doe something? Should I manually mv chmod?

@kou1okada
Copy link
Owner

May be your tar command is not cygwin's.
Please check the results of following commands:

type -a tar
declare -p PATH

@kou1okada
Copy link
Owner

You must place /usr/bin before /cygdrive/c/WINDOWS/system32 at PATH of environment variable.

❌ PATH=/cygdrive/c/WINDOWS/system32:/usr/bin
✔ PATH=/usr/bin:/cygdrive/c/WINDOWS/system32
✔ PATH=/usr/bin

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