Re: alter role - superuser - permissions

From: Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>
To: Mike <1100100(at)gmail(dot)com>,pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: alter role - superuser - permissions
Date: 2016-09-04 14:52:15
Message-ID: 05805AB1-2206-4464-B645-1C803DFE3697@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

The database is running under the postgres user, and this user has no acces to this directory. You can use something like psql <db> -f <filename>

On 4 September 2016 16:25:13 CEST, Mike <1100100(at)gmail(dot)com> wrote:
>I want to learn how to insert data into tables.
>Using postgres 9.5.x on Fedora 24.
>
>linux user account: mmm
>postgres database: mmm
>database mmm table: accounts
>
>mmm=# \du
> List of roles
> Role name | Attributes | Member of
>-----------+------------------------------------------------+-----------
> mmm | Superuser, Create DB | {}
> postgres | Superuser, Create role, Create DB, Replication | {}
>
>
>Tried to use the copy command to insert data from .csv file into table
>named "accounts"
>
>It appears I was successful in altering the role of user "mmm" and
>making it a superuser.
>
>But, when I try the copy command, the following error occurs:
>
>mmm=# copy accounts
>(employ_last,employ_first,service,website,userid,password) from
>'/home/mmm/Documents/accounts-services.csv';
>ERROR: could not open file
>"/home/mmm/Documents/accounts-services.csv" for reading: Permission
>denied
>mmm=#
>
>If mmm is a superuser, and user mmm owns the mmm database, the .csv
>file is in mmm's home directory, what other permissions are required
>or still incomplete?
>
>Thank you for your help.
>
>Best regards,
>
>Mike
>
>
>--
>Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-novice

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Mike 2016-09-04 15:07:57 Re: alter role - superuser - permissions
Previous Message Mike 2016-09-04 14:25:13 alter role - superuser - permissions