A
A
Alexander Alexandrovich2015-03-09 22:49:36
PostgreSQL
Alexander Alexandrovich, 2015-03-09 22:49:36

PostgreSQL sees foreign databases - is this normal?

The guys installed PostgresSQL and phpPgAdmin, made several users and created databases for them, but each user sees someone else's database, is this normal?
3516ea4f6d854c22a6375094013b21d4.png
Each database belongs to its user
It seems to me that no, I roamed and did not find anything about this. Can anyone say late?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Anton Nagaets, 2015-03-10
@gr1mm3r

If you need to separate the visibility of databases by users, then this is not correct.
you have created databases visible to everyone (I can’t say about grants because I don’t see them.
If you need to create databases and lock users in them, then use 2 commands

CREATE ROLE имя_пользователя WITH LOGIN PASSWORD 'пароль';
CREATE DATABASE имя_базы WITH OWNER Имя_пользователя;

To correct the situation now, use Revoke
Read more on Revoke
Give a specific user access to the database using Grant
More about GRANT

S
Sergey, 2015-03-10
Protko @Fesor

%D1%82%D0%B0%D0%B9%D0%BD%D0%B0%D1%8F-%D0
If you can take data from there, or even worse, write it down, etc. - you need to look at the access rights settings.

S
Saboteur, 2015-03-10
@saboteur_kiev

> The guys installed PostgresSQL and phpPgAdmin, created several users and created databases for them, but each user sees someone else's database, is this normal?
You are the database administrator. The database works the way YOU set it up. You specify what you want - if you want everyone to see other people's bases - then you did everything right and that's fine. If you want everyone to see only their database, then this is not normal, and you have not configured access rights.

S
Sergey, 2015-03-09
@butteff

It's not normal, I think.
This means that other users or a group of these users have read rights.

V
Vladimir, 2015-03-10
@rostel

select * from pg_catalog.pg_roles;
field "rolsuper" for all users "t"?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question