]
Brian Stansberry resolved WFCORE-4522.
--------------------------------------
Resolution: Duplicate Issue
Duplicates WFCORE-4521
The add-user.sh script fails if $WILDFLY_HOME/domain is missing
---------------------------------------------------------------
Key: WFCORE-4522
URL:
https://issues.jboss.org/browse/WFCORE-4522
Project: WildFly Core
Issue Type: Bug
Components: Management, Security
Affects Versions: 9.0.1.Final
Reporter: Brian Stansberry
Assignee: Jeff Mesnil
Priority: Critical
If the $WILDFLY_HOME/domain is missing (which will often be the case with a
Galleon-provisioned server, 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.