I mean to create symbolic links in Msys2 (currently using the version from PortableApps). I only get files copied, no symlinks.

What I tried:

  1. Uncommenting line MSYS=winsymlinks:nativestrict in all three mingw32.ini, mingw64.ini, msys2.ini just in case. Then I get

    $ ln -s targetfile symlink
    ln: failed to create symbolic link 'symlink': Operation not permitted

    I guess this is because I need to run msys2 as admin. I cannot do that.

  2. In a command prompt

    > mklink symlink targetfile
    Carece de privilegios suficientes para realizar esta operación.

    (in Spanish, my locale, meaning You do not have sufficient privileges to perform this operation). I guess it is the same need for running the command prompt as admin. I couldn't manage to run mklink from within msys2, but I guess I would have the same problem.

Is there any way of accomplishing what is asked in the title?

Related references I found:

Use mklink in msys

  • for what it's worth, junctions don't require special privileges: mklink /J ... – T Nierath Jan 11 at 7:53

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.