tatane Posted June 13, 2013 Share Posted June 13, 2013 (edited) Hi, Thank you for this great UDF ! I'm wondering if it's possible to grant permission access to Active Directory users/groups ? Must I specify the name of the AD user like local account user ? Group too ? Here is a example with AD account : ; testDIR was created before the script execution $TI = TimerInit() Dim $aPerm $aPerm = 'ADuser' $aPerm = 1 $aPerm = BitOr($ACTRL_DIR_TRAVERSE, $ACTRL_DIR_LIST) $ret = _EditObjectPermissions(@ScriptDir&'testDIR',$aPerm) $erreur = @error $TD = TimerDiff($TI) MsgBox(0,'','Add access aces: '&$aPerm&@CRLF&@CRLF& _ '_EditObjectPermissions return value: '&$ret&' erreur='&$erreur&' Time: '&Round($TD,2)&' miliseconds.'&@CRLF& _ 'Check the file permissons before closing the message box.') With this script, I keep geting a return code = 0 and @error = 0. Am I doing something wrong ? EDIT : It was my fault. It is not @ScriptDir&'testDIR' but @ScriptDir&''&'testDIR' The AD user name or AD group name works too. Yet I've got something strange with permissions. All permissions I add are set in "Specials Permissions". Is it normal ? EDIT 2 : OK I get it. Permissions in the Security Tab are combined special permissions. eg : $LIST_FOLDER_CONTENTS = BitOR($FILE_TRAVERSE, $FILE_READ_DATA, $FILE_READ_ATTRIBUTES, $FILE_READ_EA, $GENERIC_READ) Edited June 13, 2013 by tatane Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now