Вам необходимо использовать пространство имен Security
.
См. этот ТАК ответ.
Из ответов:
FileIOPermission writePermission = new FileIOPermission(FileIOPermissionAccess.Write, filename);
if(!SecurityManager.IsGranted(writePermission))
{
//No permission.
//Either throw an exception so this can be handled by a calling function
//or inform the user that they do not have permission to write to the folder and return.
}
Обновление: (следующие комментарии)
FileIOPermission
касается политик безопасности, а не разрешений файловой системы, поэтому вам нужно использовать DirectoryInfo.GetAccessControl
.