rmyorston / busybox-w32

WIN32 native port of BusyBox.
https://frippery.org/busybox
Other
674 stars 124 forks source link

expanding readme for pain points: enabling symbolic links on Windows without dev mode #360

Open doctorpangloss opened 1 year ago

doctorpangloss commented 1 year ago

this snippet of powershell correctly enables the current user to create symlinks (ln -s)

$exportPath = "$env:TEMP\secpol.cfg"
$importPath = "$env:TEMP\secpol_modified.cfg"
$dbPath = "$env:TEMP\secpol.sdb"
secedit /export /cfg "$exportPath"
(Get-Content $exportPath) -replace '^SeCreateSymbolicLinkPrivilege.*$', ("SeCreateSymbolicLinkPrivilege = *S-1-5-32-544,*" + [System.Security.Principal.WindowsIdentity]::GetCurrent().User.Value) | Set-Content $importPath
secedit /import /db "$dbPath" /cfg "$importPath" /overwrite
Remove-Item $exportPath
Remove-Item $importPath
Remove-Item $dbPath

there isn't a specific Linux set of actions that correspond to this, because why would you prevent users from creating symlinks? but it's a routine pain point. windows users have to enable dev mode, even on Windows Server, for non-administrators to have symlinking privileges. this is a headless solution.

would you be interested in docs / wiki related to this?