I've finally had time to play with this.
It was no good trying to set permissions for the whole drive as Users need more permissions for specific folders.
Share is set to everyone full.
Cadusers and Users get readonly for the drive.
Then Cadusers get full control for each Job folder (Subfolders and files)
Users get full control for specific subfolders.
The code is simple to give the permissions
private static void AddFullcontrol(string sFolder, string sAccount)
{
Document doc = acadApp.DocumentManager.MdiActiveDocument;
Editor ed = doc.Editor;
bool bMod;
AccessControlType allow = AccessControlType.Allow;
InheritanceFlags inherit = InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit;
PropagationFlags pInherit = PropagationFlags.None;
if(sAccount==@"LEX\CadUsers")
pInherit = PropagationFlags.InheritOnly;
FileSystemRights fullcontrol = FileSystemRights.FullControl;
DirectoryInfo DirInfo = new DirectoryInfo(sFolder);
DirectorySecurity dSecurity = DirInfo.GetAccessControl();
FileSystemAccessRule fsaWrite = new FileSystemAccessRule(sAccount, fullcontrol, inherit, pInherit, allow);
dSecurity.ModifyAccessRule(AccessControlModification.Add, fsaWrite, out bMod);
DirInfo.SetAccessControl(dSecurity);
ed.WriteMessage(Environment.NewLine + sFolder + "=" + bMod.ToString());
} // end AddFullcontrol
and since I make the folders, I add the permissions as I make them.
The hard part was the folder on the drive bought permissions with it that never showed up, so whatever I did didn't work until I unticked inherit from parant and made a copy.