superkret@feddit.org to Linuxsucks@lemmy.worldEnglish · 1 个月前WSL goes brrrfeddit.orgexternal-linkmessage-square51fedilinkarrow-up1260arrow-down144
arrow-up1216arrow-down1external-linkWSL goes brrrfeddit.orgsuperkret@feddit.org to Linuxsucks@lemmy.worldEnglish · 1 个月前message-square51fedilink
minus-squareBoomkop3@reddthat.comlinkfedilinkEnglisharrow-up2·1 个月前Actually no, wine is pretty handy within wsl on windows to restrict windows apps to certain folders on your system
minus-squarehemko@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up6·1 个月前Wouldn’t it be easier to run the program as an user with restricted access…?
minus-squareBoomkop3@reddthat.comlinkfedilinkEnglisharrow-up1·1 个月前Not if you want to just pop it up with a single command line and close it as quickly
minus-squarehemko@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up2·1 个月前You could just write a small script for that? There must be something like su
minus-squareBoomkop3@reddthat.comlinkfedilinkEnglisharrow-up2·1 个月前Su isn’t on windows, and does the exact opposite to restricting filesystem access to a specific subset
minus-squarehemko@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up3·1 个月前su allows you to swap to another user in shell, not just make yourself root. ‘runas’ looks like it’d do just the job
minus-squareBoomkop3@reddthat.comlinkfedilinkEnglisharrow-up2·1 个月前runas can do that, yes. Now how are you planning yo also create that user in the same command line? And to dispose of it automatically when the process ends?
minus-squareBoomkop3@reddthat.comlinkfedilinkEnglisharrow-up2·1 个月前runas can do that, yes. But it won’t make you a virtual file system, or give you a nat firewall. One use case for this is the backblaze backup utility. It’s kinda stupid in that it has an all-or-nothing approach to backups. Putting it in a container restricts it in a much easier and reliable way than running it with a special user account.
minus-squareabsGeekNZ@lemmy.nzlinkfedilinkEnglisharrow-up1·1 个月前You had me right up till the end…nice work.
Actually no, wine is pretty handy within wsl on windows to restrict windows apps to certain folders on your system
Wouldn’t it be easier to run the program as an user with restricted access…?
Not if you want to just pop it up with a single command line and close it as quickly
You could just write a small script for that? There must be something like su
Su isn’t on windows, and does the exact opposite to restricting filesystem access to a specific subset
su allows you to swap to another user in shell, not just make yourself root.
‘runas’ looks like it’d do just the job
runas can do that, yes. Now how are you planning yo also create that user in the same command line? And to dispose of it automatically when the process ends?
runas can do that, yes. But it won’t make you a virtual file system, or give you a nat firewall.
One use case for this is the backblaze backup utility. It’s kinda stupid in that it has an all-or-nothing approach to backups.
Putting it in a container restricts it in a much easier and reliable way than running it with a special user account.
You had me right up till the end…nice work.