# Troubles executing import/migration scripts

**URL:** <https://meta.discourse.org/t/troubles-executing-import-migration-scripts/240473>\
**Category:** Migration\
**Created:** [September 30, 2022, 10:24am UTC](https://meta.discourse.org/t/troubles-executing-import-migration-scripts/240473 "2022-09-30T10:24:04Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Maight723](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Maight723](https://meta.discourse.org/u/Maight723)\
**Post date:** [September 30, 2022, 12:09pm UTC](https://meta.discourse.org/t/troubles-executing-import-migration-scripts/240473/8 "2022-09-30T12:09:10Z")

</div>

Yes, now I got it. I executed the script as `root`, but not as user `discourse`:

```plaintext
./launcher enter app
cd /var/www/discourse
su discourse
bundle exec ruby script/import_scripts/import.rb

```

Thanks for the support @pfaffman \<3

---

_[View the full topic](https://meta.discourse.org/t/troubles-executing-import-migration-scripts/240473)._
