linux - Why Dropbox causes PostgreSQL permission denied errors? -


i installed postgresql-common , postgresql-9.4 package manager apt-get. changed database system osx debian 8.1 after have had difficulties permission denied errors. user postgres exists (create user postgres;) , database detector exists create database detector 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 same unsuccessfully in dropbox -directory

masi@pc212:~$ cd dropbox/ masi@pc212:~/dropbox$ sudo -u postgres psql detector -c "drop table measurements;" not change directory "/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 );" not change directory "/home/masi/dropbox": permission denied create table 

settings

the command psql in 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 keep code /home/masi/dropbox/det/ possibly dropbox installation 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 can change dropbox

  • drwx------ 26 masi developers 4096 jul 13 16:05 dropbox/

but not able increase permissions because start ls: cannot access ../../dropbox/: permission denied although having open permissions. strange behaviour here open permissions lead such behaviour.

similar errors

  • this thread nautilus-dropbox no nautilus-dropbox in system

why dropbox causing such problem postgresql?

content of dropbox encrypted , must mapped, not every users have access $home/dropbox on system. when use unix file manager line nautilus or nemo, dropbox have install plugin can browse files if simple directory.

this directory can read / write user installed dropbox , postgresql runs under it's own user in different group. may add postgresql user group have access $home/dropbox (your user installed , configured dropbox)

alternatly, might script cp dropbox normal folder if intention create live backup discourage using sync cloud service for many reasons first 1 being http://support.code42.com/crashplan/latest/backup/comparing_cloud_backup_and_cloud_storage.

edit add postgresql act user have own group or shared group

easiest way ls -la $home/dropbox , see user , group assosiated ./ add specific group user postgres

you can type groups postgres @ groups user have access , confirm once added group.

that way postgres's user have same access you. security, might not sysadmin recommend (which not). more : create new group (lets my_dropbox_group) change rights execute / read / write group. add user , postgres my_dropbox_group's group way restrict postgres dropbox , user have same access my_dropbox_group group. if have multiple users each 1 having personnal dropbox, have create different groups peoples can't access other dropboxes, dropbox_mike , dropbox_paul being 2 differents dropbox account , manage access manually that

hope didn't mixed thing second part


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -