permis.sxp for every users
search cancel

permis.sxp for every users

book

Article ID: 266695

calendar_today

Updated On:

Products

CA Client Automation - IT Client Manager CA Client Automation CA Client Automation - Software Delivery

Issue/Introduction

permis.sxp is executed during installation of SXP Package. But installation fails if permis.sxp tries to set permissions on files or directories which do not yet exist.
 
These files or directories are created at user logon using files Udirs.sxp and/or Ufiles.sxp
 
How to set directories/files permissions for every users ?

Environment

Client Automation - All Versions

Cause

permis.sxp is executed only once during SXP Package installation (like other .sxp files : dirs.sxp, files.sxp etc...)
 
u*.sxp files are special files which are processed/executed at every logon user.
 
Only these files exist :
Uactions.sxp
Udirs.sxp
Ufiles.sxp
Uininnnn.sxp
Ulinks.sxp
Ureg.sxp
Uregdel.sxp
 
 
The file upermis.sxp does not exist.

Resolution

As workaround we could use the file uactions.sxp to execute a command which set the permissions on the user files/folders
 
Example : 
Here is an example of uactions.sxp file :
 
https://api-broadcom-ca.wolkenservicedesk.com/attachment/get_attachment_content?uniqueFileId=KpBO4kAoOmQgcBIhfdPsPg==
 
#InsUserActions1#
cacls.exe "$(SxpRootDir1)\log" /T /E /P Admin:F
cacls.exe "$(SxpRootDir1)\log" /T /E /P SDOFFLIN:R
cacls.exe "$(SxpRootDir1)\trace" /T /E /P Admin:F
cacls.exe "$(SxpRootDir1)\trace" /T /E /P SDOFFLIN:R
cacls.exe "$(SxpRootDir1)\pfe32.32" /T /E /P Admin:F
cacls.exe "$(SxpRootDir1)\pfe32.32" /T /E /R SDOFFLIN
Account1=A

#Sign#
ArchiveName=TEST_ACT
Release=1000
SXP=1.0

#Locale#
Codepage=3
 
For every first logon of user, following commands are executed :
 
cacls.exe "$(SxpRootDir1)\log" /T /E /P Admin:F
cacls.exe "$(SxpRootDir1)\log" /T /E /P SDOFFLIN:R
cacls.exe "$(SxpRootDir1)\trace" /T /E /P Admin:F
cacls.exe "$(SxpRootDir1)\trace" /T /E /P SDOFFLIN:R
cacls.exe "$(SxpRootDir1)\pfe32.32" /T /E /P Admin:F
cacls.exe "$(SxpRootDir1)\pfe32.32" /T /E /R SDOFFLIN
 
This sets the FULL permissions for Admin user on directories $(SxpRootDir1)\log, $(SxpRootDir1)\trace and $(SxpRootDir1)\pfe32.32
This sets the READ permissions for SDOFFLIN user on directories $(SxpRootDir1)\log, $(SxpRootDir1)\trace and NO ACCESS permission on $(SxpRootDir1)\pfe32.32
 
Remark :
If SXP Package is sent and a user is logged, uactions.sxp is executed immediately for logged user (same for all u*.sxp file).
So if user logoff and logon again, the command in uactions.sxp are not executed again as it was already executed during installation.
 
Example :
- SXP Package is installed and User1 is logged, cacls.exe commands in uactions.sxp are executed.
- User1 logoff and User2 logon. cacls.exe commands in uactions.sxp are executed.
- User2 logoff and logon again. uactions.sxp are not executed again
- User2 logoff and User1 logon again. uactions.sxp are not executed again
 
 
If you want that some commands in uactions.sxp are executed again for every logon, put the command in section #RepeatUserActions1#
#RepeatUserActions1#
cacls.exe "$(SxpRootDir1)\log" /T /E /P Admin:F
cacls.exe "$(SxpRootDir1)\log" /T /E /P SDOFFLIN:R
cacls.exe "$(SxpRootDir1)\trace" /T /E /P Admin:F
cacls.exe "$(SxpRootDir1)\trace" /T /E /P SDOFFLIN:R
cacls.exe "$(SxpRootDir1)\pfe32.32" /T /E /P Admin:F
cacls.exe "$(SxpRootDir1)\pfe32.32" /T /E /R SDOFFLIN
Account1=A

Additional Information

Here are some informations about uactions.sxp file :
 
There 3 sections in uactions.sxp file :
 
InsUserActions1 : for actions which run once after install product for every new user logon.
RepeatUserActions1 : actions which run at every logon of user
DeiUserActions1 : actions which run once after uninstall product for every new user logon.
 
See https://techdocs.broadcom.com/us/en/ca-enterprise-software/business-management/clarity-client-automation/14-5/using/software-management-packager/software-packager-for-windows/non-toc-topics.html#concept.dita_6a57fce320041bd8da840df1c1067b705fd7111f_UactionssxpArchiveFile