Sorry for the massive delay in my repsonse here. I'm not sure if I follow what you mean with
As per the documentation, if User1 is configured as the RunAs user, the users who will execute the application have to be part of the unix group to which User1 belongs.
From the documentation:
Each Unix account used as a custom RunAs must be a member of the primary Unix group of the Applications.RunAs user. This group membership requirement always applies, even when Applications.RunAs does not use the default rstudio-connect user.
The default rstudio-connect user has a primary group also named rstudio-connect . When using this default Applications.RunAs user, your hadley Unix account must be a member of the rstudio-connect group before that account is permitted to run a Shiny application.
This means that by default, any user that you use as the RunAs user must be a member of the rstudio-connect unix group. This does not depend on or impact the logged in user. For example, if I set the RunAs user to be james, and james is a member of the rstudio-connect group, then whenever anyone accesses that content on RStudio Connect, regardless of who they are, the process is run under the james unix account on the server. Therefore, the only user in this scenario that needs to be added to the rstudio-connect group is james.
Hope that helps.