# Errno::EACCES: Permission denied on new Ubuntu development setup

**URL:** https://meta.discourse.org/t/errno-permission-denied-on-new-ubuntu-development-setup/225446
**Category:** Support
**Created:** [April 27, 2022, 2:57pm UTC](https://meta.discourse.org/t/errno-permission-denied-on-new-ubuntu-development-setup/225446 "2022-04-27T14:57:47Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Justman10000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justman10000/32/252913_2.png) [@Justman10000](https://meta.discourse.org/u/Justman10000)
#### Post date: [April 27, 2022, 2:57pm UTC](https://meta.discourse.org/t/errno-permission-denied-on-new-ubuntu-development-setup/225446/1 "2022-04-27T14:57:47Z")

</div>

Hi, I set up Discourse without Docker, or at least wanted to until I got to this step:

```plaintext
bundle exec rake db:create

```

> Errno::EACCES: Permission denied @ rb\_sysopen - /home/discourse/tmp/ember-rails/ember.js

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 27, 2022, 3:05pm UTC](https://meta.discourse.org/t/errno-permission-denied-on-new-ubuntu-development-setup/225446/2 "2022-04-27T15:05:18Z")

</div>

Which development guide are you following?

I think the problem is that your user doesn’t have rights to create a database.

---

<div class="post-metadata">

### Author: ![Justman10000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justman10000/32/252913_2.png) [@Justman10000](https://meta.discourse.org/u/Justman10000)
#### Post date: [April 27, 2022, 3:15pm UTC](https://meta.discourse.org/t/errno-permission-denied-on-new-ubuntu-development-setup/225446/3 "2022-04-27T15:15:59Z")

</div>

I know, even though I gave the user superuser rights! And I followed [this](https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development) guide!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 27, 2022, 3:25pm UTC](https://meta.discourse.org/t/errno-permission-denied-on-new-ubuntu-development-setup/225446/4 "2022-04-27T15:25:48Z")

</div>

My best guess is that the user you created and the user that it’s using are not the same. Not sure what else to tell you, though.

---

<div class="post-metadata">

### Author: ![Justman10000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justman10000/32/252913_2.png) [@Justman10000](https://meta.discourse.org/u/Justman10000)
#### Post date: [April 27, 2022, 3:27pm UTC](https://meta.discourse.org/t/errno-permission-denied-on-new-ubuntu-development-setup/225446/5 "2022-04-27T15:27:43Z")

</div>

Ah, found out! Some files in the Discourse directory were not writable!

```plaintext
chmod -R 777 .

```

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 27, 2022, 3:28pm UTC](https://meta.discourse.org/t/errno-permission-denied-on-new-ubuntu-development-setup/225446/6 "2022-04-27T15:28:29Z")

</div>

Great! I figured it was something silly, but there are so many little things that it could be!

So you’re all set now?

---

<div class="post-metadata">

### Author: ![Justman10000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justman10000/32/252913_2.png) [@Justman10000](https://meta.discourse.org/u/Justman10000)
#### Post date: [April 27, 2022, 3:29pm UTC](https://meta.discourse.org/t/errno-permission-denied-on-new-ubuntu-development-setup/225446/7 "2022-04-27T15:29:53Z")

</div>

Yes, it’s solved! Small things can make a big difference!

---

<div class="post-metadata">

### Author: ![Justman10000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justman10000/32/252913_2.png) [@Justman10000](https://meta.discourse.org/u/Justman10000)
#### Post date: [April 27, 2022, 3:34pm UTC](https://meta.discourse.org/t/errno-permission-denied-on-new-ubuntu-development-setup/225446/8 "2022-04-27T15:34:11Z")

</div>

For this there is now a new mistake (unbelievable 🙄!):

> #\<Thread:0x000055c972f94c78 /home/discourse/lib/scheduler/defer.rb:79 run\> terminated with exception (report\_on\_exception is true):  
> /usr/local/rvm/gems/ruby-3.0.2/gems/activerecord-6.1.4.7/lib/active\_record/connection\_handling.rb:323:in `connection_pool': ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished) from /usr/local/rvm/gems/ruby-3.0.2/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management/rails_61_compat.rb:8:in `current’  
> from /usr/local/rvm/gems/ruby-3.0.2/gems/rails\_multisite-4.0.1/lib/rails\_multisite/connection\_management.rb:115:in `current_db_hostnames' from /usr/local/rvm/gems/ruby-3.0.2/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:111:in `current\_hostname’  
> from lib/discourse.rb:176:in `handle_job_exception' from /home/discourse/lib/scheduler/defer.rb:102:in `rescue in do\_work’  
> from /home/discourse/lib/scheduler/defer.rb:101:in `do_work' from /home/discourse/lib/scheduler/defer.rb:79:in `block (2 levels) in start\_thread’  
> /usr/local/rvm/gems/ruby-3.0.2/gems/activerecord-6.1.4.7/lib/active\_record/connection\_handling.rb:323:in `connection_pool': ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished) from /usr/local/rvm/gems/ruby-3.0.2/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:79:in `with\_connection’  
> from /home/discourse/lib/scheduler/defer.rb:89:in `do_work' from /home/discourse/lib/scheduler/defer.rb:79:in `block (2 levels) in start\_thread’
