[jboss-jira] [JBoss JIRA] (WFCORE-4521) add-user script fails when there is no domain configuration
Brian Stansberry (Jira)
issues at jboss.org
Wed Jun 12 14:47:00 EDT 2019
[ https://issues.jboss.org/browse/WFCORE-4521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13746028#comment-13746028 ]
Brian Stansberry edited comment on WFCORE-4521 at 6/12/19 2:46 PM:
-------------------------------------------------------------------
The problem is PropertyFileFinder is invoking the validatePermissions check on files that don't exist, and those checks fail not because of missing perms but because you can't read or execute non-existing files. The validatePermissions checks are called from findFiles, which is already dealing with non-existing files (i.e. not adding them to the foundFiles list and returning false if no files exist) so I don't see a reason to validate non-existing files.
was (Author: brian.stansberry):
Using add-user.sh fails:
{code}$ bin/add-user.sh
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): a
* Error *
WFLYDM0106: File permissions problems found while attempting to update /home/bes/dev/wildfly/wildfly-core/build/target/wildfly-core-9.0.1.Final/domain/configuration/mgmt-users.properties file.
{code}
The problem is PropertyFileFinder is invoking the validatePermissions check on files that don't exist, and those checks fail not because of missing perms but because you can't read or execute non-existing files. The validatePermissions checks are called from findFiles, which is already dealing with non-existing files (i.e. not adding them to the foundFiles list and returning false if no files exist) so I don't see a reason to validate non-existing files.
> add-user script fails when there is no domain configuration
> -----------------------------------------------------------
>
> Key: WFCORE-4521
> URL: https://issues.jboss.org/browse/WFCORE-4521
> Project: WildFly Core
> Issue Type: Bug
> Components: Management, Scripts
> Affects Versions: 9.0.1.Final
> Environment: OS Darwin Kernel Version 17.7.0
> Java 1.8.0_192-ea
> WildFly Full 17.0.0.Final (WildFly Core 9.0.1.Final)
> Reporter: Rafael Soares
> Assignee: Brian Stansberry
> Priority: Blocker
>
> When you have a wildfly installation with no domain configuration directory (WILDFLY_HOME/domain) the {{bin/add-user.sh}} fails because it expects both (standalone and domain) configs to exists in order to update the properties file...
> It seems this behavior is fixed in the code implementation at [org.jboss.as.domain.management.security.adduser.AddUser.java|https://github.com/wildfly/wildfly-core/blob/master/domain-management/src/main/java/org/jboss/as/domain/management/security/adduser/AddUser.java#L160]
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list