http://www.vbforums.com/showthread.php?616021-Setting-file-and-folder-permissions
There are a few examples of this already on the web but most of them are over complicated and dont just give you a simple example so I thought it might be worth writing one here.
Basically this code can be used to grant or restrict access for a specific user to a folder (see post #6 in this thread for example of setting permissions on a file instead of a folder). There are several things that you can play around with in this example to modify the effects (e.g deny permission instead of granting permission,modify the inheritance of the new permission,change the specific permissions issued etc etc) but if you run it as it is then it will grant the user Modify access to the folder and this permission will be inherited by any child objects within the folder. The new permission will also just be added to the folder's permission list,it will not replace the permissions already on the folder - If you want to completely remove all of the existing permissions on the folder when you add this new permission then you uncomment the line that is commented out near the end of the code.
'At the top of your code- Imports System. Security. AccessControl