walter21 Posted February 6, 2018 Posted February 6, 2018 Hello, my walter21_walter user is not able to query on tables with schema that is not public, I was only able to access tables within the public schema, even granting privileges to that user in other schemas, I want to know if I have to put the user walter21_walter as owner for all tables of all schemas?
Krydos Posted February 6, 2018 Posted February 6, 2018 You can add permissions to your database users at https://johnny.heliohost.org:2083/frontend/paper_lantern/psql/index.html 1
walter21 Posted February 7, 2018 Author Posted February 7, 2018 (edited) Thanks for replying Krydos, I have already done this, I am sending the printscreen as is, I assign all the privileges to user walter21_walter even so he can only access the tables in schema public, I am sending a printscreen that who is as owner is walter_cidade , but I did not create this user.https://prnt.sc/ibc39chttps://prnt.sc/ibc333 Edited February 7, 2018 by walter21
Krydos Posted February 7, 2018 Posted February 7, 2018 I did not create this user.Does someone else have access to your account? Perhaps it is best to change you passwords, backup the data, drop the database, and then recreate it with the proper permissions. 1
walter21 Posted February 7, 2018 Author Posted February 7, 2018 (edited) Does someone else have access to your account? yes, someone else had access to the database, but it was the root administrator wolstech, he helped me a lot, he imported the database for me, why can not import through the pgphpadmin interface, why the bank is a little big, I believe that without intention he put the owner of the database that user walter21_cidade, instead of walter21_walter, how do you Krydos assign the walter21_cidade bank to the owner walter21_walter? Thanks in advance. Allow me to apologise for my English Edited February 7, 2018 by walter21
wolstech Posted February 7, 2018 Posted February 7, 2018 The user actually already existed when I imported that DB. I did indeed change the ALTER commands to use that user since it matched the name of the database and the file provided referenced a user that did not exist. 1
walter21 Posted February 7, 2018 Author Posted February 7, 2018 (edited) So if I create a user with the same name of the current bank owner (walter_cidade) and grant the user access to the bank, this solves my problem, am I right? edit: I tried and I can not, show this message Postgres :: adduser (cidade, walter21) failed: (XID ecr2rg) The database "walter21_cidade" already exists, and you, "walter21", are not allowed to create a user with the same name. Edited February 7, 2018 by walter21
wolstech Posted February 8, 2018 Posted February 8, 2018 Hm. OK...I'll reassign the owner of the objects in that DB to walter21_walter...
wolstech Posted February 8, 2018 Posted February 8, 2018 I can't reassign these for you because the server doesn't have enough memory. Maybe Krydos would know a better way to do it. I suppose the worst case is we drop the database and start over with the permissions correct this time... walter21_cidade=# reassign owned by walter21_cidade TO walter21_walter walter21_cidade-# \g WARNING: out of shared memory ERROR: out of shared memory HINT: You might need to increase max_locks_per_transaction. walter21_cidade=#
walter21 Posted February 8, 2018 Author Posted February 8, 2018 (edited) I'll wait for the Krydos, if it has a better way, so you do not go through all the import work again. Thanks again Edited February 8, 2018 by walter21
Krydos Posted February 8, 2018 Posted February 8, 2018 I would just drop the database, and start over. Want me to do it this time or do you want to try again?
walter21 Posted February 9, 2018 Author Posted February 9, 2018 if you do not have another solution, yes, but wolstech had some problems when importing why the database is for a newer version, and also need to be by command line, because the interface has no way, why its size is a bit great, but wolstech got it.
wolstech Posted February 9, 2018 Posted February 9, 2018 I'd actually recommend moving to Ricky or Tommy if you can before I import this again. That way you have the correct version of postgres to go with this as well. Also, please drop the existing database and recreate it if you want me to rerun this. Let me know which user should own the content, and which database the content should be imported into this time around. I'll assume the two files are still in your home folder.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now