<blockquote>
  <p>-bash: ./pull_db.sh: Permission denied</p>
</blockquote>

<p>The error indicates that the shell script doesn't have execute permissions.  Running this command should make it executable:</p>

<pre><code>chmod +x pull_db.sh
</code></pre>

CC BY-SA 3.0
2017-06-16T18:45:15.223Z
2017-06-16T18:45:15.223Z
Brad Bell
<p>I've recently setup a new cloud server for a client with a Craft Multi Environment setup. And I also would like to to be able to do the <a href="https://nystudio107.com/blog/database-asset-syncing-between-environments-in-craft-cms" rel="nofollow noreferrer">Database &amp; Asset Syncing Between Environments in Craft CMS</a> as in the excellent <a href="https://nystudio107.com" rel="nofollow noreferrer">nystudio107</a> article.</p>

<p>I have it setup at my work and it works really well as you just have to navigate to <strong>/scripts</strong> folder via the terminal, and then type <code>./pull_db.sh</code></p>

<p>Like I said I have this setup at my office and it works really well. But on this new server I've setup I'm having an issue in that I get the following when I do the <code>./pull_db.sh</code></p>

<p><code>-bash: ./pull_db.sh: Permission denied</code></p>

<p>I've checked the setting in the <code>.env.sh</code> that I've created and match what I have in the office setup. So need to work out why I'm getting the permission denied.</p>

<p>Anyone got any ideas?</p>

CC BY-SA 3.0
2017-06-16T15:37:11.633Z
Does `pull_db.sh` have execute permissions set? i.e. `chmod +x pull_db.sh`
Brad Bell
CC BY-SA 3.0
2017-06-16T15:41:19.727Z
That was it. Awesome, thanks. Makes my life so much easier with the multi environment config and database and asset syncing. They should add it to Craft 3
mention79
CC BY-SA 3.0
2017-06-16T15:41:57.850Z
make that the answer
mention79
<assets><database>
Database & Asset Syncing Between Environments
# Database & Asset Syncing Between Environments

(Asked by: username_0 on 2017-06-16)

I've recently setup a new cloud server for a client with a Craft Multi Environment setup. And I also would like to to be able to do the [Database & Asset Syncing Between Environments in Craft CMS](https://nystudio107.com/blog/database-asset-syncing-between-environments-in-craft-cms) as in the excellent [nystudio107](https://nystudio107.com) article.

I have it setup at my work and it works really well as you just have to navigate to **/scripts** folder via the terminal, and then type `./pull_db.sh`

Like I said I have this setup at my office and it works really well. But on this new server I've setup I'm having an issue in that I get the following when I do the `./pull_db.sh`

`-bash: ./pull_db.sh: Permission denied`

I've checked the setting in the `.env.sh` that I've created and match what I have in the office setup. So need to work out why I'm getting the permission denied.

Anyone got any ideas?

**Tags:** assets, database
> **Comments:**
> **username_1**: Does `pull_db.sh` have execute permissions set? i.e. `chmod +x pull_db.sh`  
> **username_0**: That was it. Awesome, thanks. Makes my life so much easier with the multi environment config and database and asset syncing. They should add it to Craft 3  
> **username_0**: make that the answer  

---

## 1 answers

### Answer by username_1 on 2017-06-16. Score: 2 | Accepted answer

-bash: ./pull_db.sh: Permission denied

The error indicates that the shell script doesn't have execute permissions.  Running this command should make it executable:
chmod +x pull_db.sh


---

