Fully delete Bulkmail Users from system


(Jamie Smith) #1

Hello. I'm using import_asset_csv_to_matrix.php to create Bulkmail Users assets under a User Group asset so I can send out a bulk email. However, because certain users exist elsewhere on the system (e.g. under another User Group asset), I'm getting an error message: 

Unable to set "email" it is a unique attribute and another asset already uses "foo@bar.com" [SYS0251]

This warning persists even when I delete the existing Bulkmail Users via the Asset Map.

 

I get some PHP errors when trying to purge the asset from the Trash:

 

user_import_error.png

 

Is there a way to fully delete Bulkmail Users from the system?

 

I tried adding additional arguments (email and D/E; please see below) in an attempt to delete the assets via import_asset_csv_to_matrix.php (rather than via the Asset Map) but I get the same error message.

php import_asset_csv_to_matrix.php /var/www/mysource_matrix bulkmail_user /path/to/users.csv 123456 321 /path/to/meta.map /path/to/attribute.map 0 email D

Has anyone experienced this issue in the past?

 

Many thanks in advance.

 

Matrix version: 4.14.1


(Benjamin Pearson) #2

It looks like you are running the script as a non webserver user. If you change permissions on the data/ dir to the webserver user (sorry the name varies from distro to distro, so it could be www-data or apache or httpd), then purge trash and it should be fine.

 

To run the command from the command, you would need to be the root user and do something like (but obviously substitute www-data to whatever your webserver user is):

chown -R www-data:www-data data/