Permission denied @ dir_s_mkdir - /var/www/discourse/public/uploads/default/original/2X

Hi,

Not sure what happened but this error just happens when I tried to upload attachment (jpg)

Permission denied @ dir_s_mkdir - /var/www/discourse/public/uploads/default/original/2X

Anyone know about this?

Thanks in advance.

Some element of the path leading to that directory is missing a necessary permission. Ensure that the parent directory is writable by UID 1000, and that all the higher-level directory components are traversable (x permission) by UID 1000.

3 Likes

Hi,

I had fixed it, it was permission on the /shared/* folder.

But then this error came up.

PG::InsufficientPrivilege: ERROR: could not open file “base/32822/45579”: Permission denied

What gives?

Same general principle, except this time you’ve busted the permissions to the PostgreSQL data directory.

3 Likes

How did you install discourse?

1 Like

Normal installation following the guideline to install on Ubuntu.

Are you sure? I’ve never seen permission errors like that, but then again on Digital Ocean (for example) you generally log in as root to do the install.

It is not suppose to install using root account?

I am not using Digital Ocean but leaseweb.

It was working before but I had to migrate to a different server under the same hosting company.

I had to import backup manually due to some issue with the system in several commits earlier.

Don’t think that’s the cause though.

I tried to upgrade and rebuild

Everything seem to be working again now.

Thanks.

1 Like