GRANTing access to VIEW not working

I logged in as psuedosuperuser and granted access to a view to an ID . But he is not able to get the access . It shows Permission denied. Any special steps needs to be taken while giving access to Views. 

I followed the steps in Admin manuals for vertica .....


Comments

  • What version of Vertica are you running? View privileges had some issues in the past but I am pretty sure that all were resolved in the latest version. Still have some tricks and considerations but I recommend you to read those in the documentation under the topic View Privileges. 

    https://my.vertica.com/docs/7.0.x/HTML/index.htm#Authoring/AdministratorsGuide/Security/DBUsersAndPrivileges/ViewPrivileges.htm?Highlight=view%20grant

    Hope this helps, if you still have issues, I recommend you to send us the exact commands how do you create the view and how do you grant the access. 

    Eugenia


  • Hello Eugenia,

    Thanks for your reply. We are running Vertica 7.0.1 .

    I created them as a user A. Then set my session as PSUEDOSUPERUSER and granted SELECT/ALL to user B . 

    Please let me know if this has any error in process. 
  • This is a simple test that I did and seem to work fine, maybe you can follow up the steps and see if resolve your issue. 


    dbadmin=> create table a (c1 int, c2 int);
    CREATE TABLE

    dbadmin=> copy a from stdin;
    Enter data to be copied followed by a newline.
    End with a backslash and a period on a line by itself.
    >> 1|2
    >> 1|4
    >> 2|3
    >> \.

    dbadmin=> grant select on a to test with grant option;
    GRANT PRIVILEGE

    dbadmin=> \c - test
    You are now connected as user "test".

    dbadmin=> create view tv as select c1 from a;
    CREATE VIEW

    dbadmin=> select * from tv;
     c1 
    ----
      2
      1
      1
    (3 rows)

    dbadmin=> grant select on tv to test2;
    GRANT PRIVILEGE

    dbadmin=> \c - test2;
    You are now connected as user "test2".
    dbadmin=> select * from tv;
     c1 
    ----
      1
      1
      2
    (3 rows)


Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file