Home Why Dropbox causes PostgreSQL permission denied errors?
Reply: 0

Why Dropbox causes PostgreSQL permission denied errors?

user2418
1#
user2418 Published in May 20, 2018, 10:15 am

I installed postgresql-common and postgresql-9.4 with the package manager apt-get. I changed my database system from OSX to Debian 8.1 after which I have had difficulties with Permission denied errors. The user postgres exists (CREATE USER postgres;) and database detector exists CREATE DATABASE detector WITH OWNER=postgres;).

I run successfully

masi@pc212:~$ sudo -u postgres psql detector -c "DROP TABLE measurements;"DROP TABLE
masi@pc212:~$ sudo -u postgres psql detector -c "CREATE TABLE measurements ( m_id SERIAL PRIMARY KEY NOT NULL, m_size INTEGER NOT NULL );"
CREATE TABLE

but the same unsuccessfully in Dropbox -directory

masi@pc212:~$ cd Dropbox/
masi@pc212:~/Dropbox$ sudo -u postgres psql detector -c "DROP TABLE measurements;"
could not change directory to "/home/masi/Dropbox": Permission denied
DROP TABLE
masi@pc212:~/Dropbox$ sudo -u postgres psql detector -c "CREATE TABLE measurements ( m_id SERIAL PRIMARY KEY NOT NULL, m_size INTEGER NOT NULL );"
could not change directory to "/home/masi/Dropbox": Permission denied
CREATE TABLE

Settings

The command psql is in the SECURE_PATH in /etc/sudoers:

Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

The command which psql gives /usr/bin/psql.

The real directory where I keep the code is /home/masi/Dropbox/det/ where possibly the Dropbox installation is affecting thing:

  • drwxr-xr-x 32 masi masi 4096 Jul 14 10:27 masi/
  • drwx------ 26 masi masi 4096 Jul 13 16:05 Dropbox/
  • drwxr-xr-x 8 masi developers 4096 Jul 14 09:22 det/

where I can change the Dropbox to

  • drwx------ 26 masi developers 4096 Jul 13 16:05 Dropbox/

but not able to increase permissions because I start to get ls: cannot access ../../Dropbox/: Permission denied although having fully open permissions. This is a very strange behaviour that here fully open permissions lead to such a behaviour.

Similar errors

  • this thread about nautilus-dropbox but no nautilus-dropbox in my system

Why Dropbox is causing such a problem to PostgreSQL?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.348534 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO