Hello,
in a package I run a script at the end that should grant rights to a domain group on a directory of the deployed application.
My script, essai.bat, is:
icacls c:\temp\essai.txt /T /grant "adgroup@mydomain":f
icacls c:\temp\essai.txt /T /grant "everyone":r
The result: the "everyone" group is added, but not the domain group.
Manually running the script gives the expected result.
Thank you all.
managing security on a folder after deployment
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Good morning,
Is this script called by the setup.py file in the WAPT package?
Have you tried executing these lines directly in a run() command?
Sincerely,
Alexander
Is this script called by the setup.py file in the WAPT package?
Have you tried executing these lines directly in a run() command?
Code: Select all
run([makepath(WAPT.wapt_base_dir,'vc_redist','icacls.exe'),r'c:\temp\essai.txt','/T /grant "adgroup@mondomaine":f'])
run([makepath(WAPT.wapt_base_dir,'vc_redist','icacls.exe'),r'c:\temp\essai.txt','/T /grant "tout le monde":r'])Alexander
I've tried several different settings for icacls but I keep getting a "returned non-zero exit status 87" error
What settings are needed to grant access to a folder to all users or everyone?
CalledProcessErrorOutput: Command ['C:\\wapt\\vc_redist\\icacls.exe', 'C:\\Program Files\\SolidWorks Corp', '/grant *S-1-1-0:(OI)(CI)M /C /T'] returned non-zero exit status 87.
Output:u'Param\xe8be invalid \xab\xa0/grant *S-1-1-0:(OI)(CI)M /C /T\xa0\xbb\r\r\n'
The control operates manually.
What settings are needed to grant access to a folder to all users or everyone?
Code: Select all
run([makepath(WAPT.wapt_base_dir,'vc_redist','icacls.exe'),r'C:\Program Files\SolidWorks Corp','/grant *S-1-1-0:(OI)(CI)M /C /T'])Output:u'Param\xe8be invalid \xab\xa0/grant *S-1-1-0:(OI)(CI)M /C /T\xa0\xbb\r\r\n'
The control operates manually.
Good morning,
Slashes in arguments are interpreted differently; try putting an 'r' in front of the argument list:
Sincerely,
Alexander
Slashes in arguments are interpreted differently; try putting an 'r' in front of the argument list:
Code: Select all
run(makepath(WAPT.wapt_base_dir,'vc_redist','icacls.exe'),r'C:\Program Files\SolidWorks Corp',r'/grant *S-1-1-0:(OI)(CI)M /C /T')Alexander
So I'm getting a new error message: TypeError: unsupported operand type(s) for +: 'float' and 'str'
with this command:
with this command:
Code: Select all
run(makepath(WAPT.wapt_base_dir,'vc_redist','icacls.exe'),r'C:\Program Files\SolidWorks Corp',r'/grant *S-1-1-0:(OI)(CI)M /C /T')
Sorry, but I'm still stuck using icacls with wapt. On another package where I want to give all users permissions to a directory, I get the following message:
run(makepath(WAPT.wapt_base_dir,'vc_redist','icacls.exe'),r'%s' %destdir,r'/grant *S-1-1-0:(OI)(CI)M /C /T')
The equivalent command launched manually works:
for the following code:TypeError: unsupported operand type(s) for +: 'float' and 'str'
run(makepath(WAPT.wapt_base_dir,'vc_redist','icacls.exe'),r'%s' %destdir,r'/grant *S-1-1-0:(OI)(CI)M /C /T')
The equivalent command launched manually works:
Code: Select all
C:\wapt\vc_redist\icacls.exe C:\ProFluid44 /grant *S-1-1-0:(OI)(CI)M /C /T