# Permission denied trying to export with mmctl CLI from the Cloud Free mattermost

**URL:** https://forum.mattermost.com/t/permission-denied-trying-to-export-with-mmctl-cli-from-the-cloud-free-mattermost/16388
**Category:** Command Line Interface
**Created:** [July 12, 2023, 5:18pm UTC](https://forum.mattermost.com/t/permission-denied-trying-to-export-with-mmctl-cli-from-the-cloud-free-mattermost/16388 "2023-07-12T17:18:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![aqueipo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/aqueipo/32/7027_2.png) [@aqueipo](https://forum.mattermost.com/u/aqueipo)
#### Post date: [July 12, 2023, 5:18pm UTC](https://forum.mattermost.com/t/permission-denied-trying-to-export-with-mmctl-cli-from-the-cloud-free-mattermost/16388/1 "2023-07-12T17:18:59Z")

</div>

Hello I am trying to export all the data we have in our Cloud Free workspace before the deprecation on July 27. I succesfully created the export with the name `z8bjyxnzoidxbgrqrpc5pqpbgo_export.zip` through a mattermost instance deployed locally with docker

```bash
root@e791940e93d1:/mattermost# mmctl export create --attachments
WARNING: server version 8.0.0.cloud-2023-06-26-1.69c1b2d8d6e849123e2fb7ed3050e73b.true doesn't match mmctl version v7.1.2
Export process job successfully created, ID: z8bjyxnzoidxbgrqrpc5pqpbgo
root@e791940e93d1:/mattermost# mmctl export job show z8bjyxnzoidxbgrqrpc5pqpbgo
WARNING: server version 8.0.0.cloud-2023-06-26-1.69c1b2d8d6e849123e2fb7ed3050e73b.true doesn't match mmctl version v7.1.2
  ID: z8bjyxnzoidxbgrqrpc5pqpbgo
  Status: success
  Created: 2023-07-12 16:35:56 +0000 UTC
  Started: 2023-07-12 16:36:08 +0000 UTC
  Data: map[include_attachments:true teams_exported:1]

root@e791940e93d1:/mattermost# mmctl export list
WARNING: server version 8.0.0.cloud-2023-06-26-1.69c1b2d8d6e849123e2fb7ed3050e73b.true doesn't match mmctl version v7.1.2
z8bjyxnzoidxbgrqrpc5pqpbgo_export.zip

There are 1 exports on https://webdeporte.cloud.mattermost.com/

```

But I can not download the export:

```bash
root@e791940e93d1:/mattermost# mmctl export download z8bjyxnzoidxbgrqrpc5pqpbgo_export.zip
WARNING: server version 8.0.0.cloud-2023-06-26-1.69c1b2d8d6e849123e2fb7ed3050e73b.true doesn't match mmctl version v7.1.2
Error: failed to create/open export file: open z8bjyxnzoidxbgrqrpc5pqpbgo_export.zip: permission denied

```

---

<div class="post-metadata">

### Author: ![aqueipo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/aqueipo/32/7027_2.png) [@aqueipo](https://forum.mattermost.com/u/aqueipo)
#### Post date: [July 15, 2023, 10:58am UTC](https://forum.mattermost.com/t/permission-denied-trying-to-export-with-mmctl-cli-from-the-cloud-free-mattermost/16388/2 "2023-07-15T10:58:03Z")

</div>

I’ve already fixed the problem. For those who are in the same situation, the problem is that I logged into the container as `root` instead of `mattermost`

---

<div class="post-metadata">

### Author: ![lpnc\_it](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@lpnc\_it](https://forum.mattermost.com/u/lpnc_it)
#### Post date: [July 28, 2023, 12:01am UTC](https://forum.mattermost.com/t/permission-denied-trying-to-export-with-mmctl-cli-from-the-cloud-free-mattermost/16388/3 "2023-07-28T00:01:49Z")

</div>

how did you even get into cli on the cloud hosted instances?
