Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allow mklink for a non-admin user

Tags:

batch-file

cmd

In Linux/Unix, the command to create a symbolic link is called ln. The user doesn't need any special privileges to use it. In the Windows (from 7 onwards) the equivalent is called mklink. It can be issued from the cmd prompt but the user needs to be admin.

I find it quite useful to have symbolic links that I can just rename to pick up different code bases on different variants of the same project.

Is there a setting somewhere like a group policy of some sort that allows non-admin users to use mklink or is it just not allowed because it does something dodgy to the file system?

Edit

Non admin users can make directory links using mklink /J

like image 737
cup Avatar asked Aug 30 '25 15:08

cup


2 Answers

If you have Windows 10 or newer, and turn on Developer Mode you may be able to create Symbolic Links without requiring admin privileges.

Window 10 Developer Mode

like image 90
Compo Avatar answered Sep 02 '25 20:09

Compo


You can set this in gpedit.exe:
(I don't know the exact English terms for that)

 <computer configuration>
   <Windows settings>
     <security settings>
       <local policy>
         <user rights>
           <creating symbolic links>

There you can insert any user you want.

like image 39
Konrad Avatar answered Sep 02 '25 19:09

Konrad