So, how to make a read-only directory/folder in Windows XP?
Well, not like this:
But like this (Using PowerShell as Command Prompt is not powerful enough):
$acl = get-acl .\readonlyDir
$rule=new-object System.Security.AccessControl.FileSystemAccessRule("MY-DESKTOP\username","CreateDirectories","Deny")
$acl.SetAccessRule($rule)
$rule=new-object System.Security.AccessControl.FileSystemAccessRule("MY-DESKTOP\username","CreateFiles","Deny")
$acl.AddAccessRule($rule)
set-acl .\readonlyDir $acl
Since I'm not a Windows expert my solution is probably not optimal so I gladly accept easier ways to make a read-only directory.
No comments:
Post a Comment