Upgrading from a previous Alfresco version introduces significant architectural changes, particularly affecting system-level operations such as LDAP synchronization. One of the key challenges reported by users is encountering the following error during the sync process:
org.alfresco.service.cmr.security.NoSuchPersonException: 02020039 User does not exist and could not be created: System
This error arises due to changes in how Alfresco handles runAsSystem
, which impacts scripts, rules, and processes that previously relied on this functionality. Below, we outline the root cause of the issue and potential solutions.
Alfresco does not maintain a persistent "System" user object, but it previously allowed operations to run under the runAsSystem
context. With recent updates, some of these capabilities have been deprecated or altered, leading to failures when scripts or rules attempt to execute as "System."
runAsSystem
context, which no longer behaves as expected.runAsSystem
are filtered out in the UI and possibly in the REST API.Instead of relying on runAsSystem
, you can configure your rules or scripts to run under an admin user context:
if (!fullyAuthenticatedUser || fullyAuthenticatedUser == 'System' ) {
auth.runAsFullyAuthenticatedUser('admin');
}
Pros:
Cons:
admin
user can be deleted, making this solution potentially unreliable.Instead of triggering a rule upon user creation, a custom home folder provider could be developed to ensure home folders are created outside of rule execution, avoiding the need for runAsSystem
.
Pros:
Cons:
Some users choose to patch Alfresco to remove hardcoded filtering that excludes nodes created by runAsSystem
. This can be done by modifying query filters related to cm:creator
.
Pros:
Cons:
runAsSystem
and update them accordingly.NoSuchPersonException
or related errors.Alfresco’s transition from 5.2 to 23.3.3 brings several architectural changes that affect system-level processes, particularly LDAP synchronization and home folder creation. Understanding and addressing runAsSystem
limitations is key to a successful upgrade. Whether by modifying scripts, implementing a custom provider, or patching query filters, each solution has trade-offs that should be carefully considered.
For organizations planning an upgrade, a structured approach—testing, code review, and consulting best practices—will minimize disruptions and ensure a smooth transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.