Questions tagged [permissions]

Privileges granted to an account or role through the security mechanism of an operating system, database manager or other system.

Filter by
Sorted by
Tagged with
0 votes
1 answer
2k views

Postgresql: Permission denied to schema to user created based on master with rights

I'm trying to write a function that eventually will rotate users. Currently I have the code below which works and creates a new user using the prior user which ultimately has the same rights as the ...
1 vote
1 answer
1k views

Postgres SQL on AWS RDS how to grant permission for schema, select on tables to user

I have logged in as superuser and created a readonly user. When I run grant command, it says that schema does not exists I am logging in as root: sql -h myhost_name -U root -d postgres -W grant ...
0 votes
1 answer
427 views

MariaDB: How can I grant read-only privileges for Stored Procedures?

I've granted SELECT privileges for a user to select on all tables of a database. However that user is unsable to view store procedures. I'd want to grant only the permission for SHOW CREATE PROCEDURE (...
1 vote
3 answers
139 views

why is granting ALL permissions and privileges to a new role/user for a new database difficult with postgresql?

With mysql and am sure countless other database softwares, it is pretty easy to create a new database, create a new user and grant that user to own and be able to do everything on that database this ...
2 votes
1 answer
628 views

MySQL - Grant user permission to create table as long is it has a prefix in the name

I'd like to grant a user permission to create tables in a database so long as the table has a particular prefix, let's say example_. I've tried the following: $ mysql -u root -p mysql> CREATE ...
0 votes
1 answer
491 views

AWS RDS : Setting Create and other grants only for single Database is not working

We are using AWS RDS Mysql, and we are trying to give SELECT access to all databases i.e RO only, but for a single database, we want to give all permissions i.e CRUD. It's not working out ...
0 votes
0 answers
14 views

Suddenly pgadmin doesn't allow me to select from a table

I created a database, and created a user to access it via Python. Postgres user is an owner. I didn't access the database for a couple of weeks (before everything was working), and now when I want to ...
2 votes
2 answers
160 views

SQL Server Login Access getting revoked by a daily database refresh

Scenario : I have granted dbdatareader access on a database to the dev team. They do have daily database refresh in place . Because of this the permissions to the login , which is a SQL login are ...
0 votes
1 answer
28 views

Mysql DB viewer user (only for views) should access to information_schema and test?

I've created a user in our mysql/mariaDB engine so our customers can read some views. User has been created as follows and can query the views with no problem. CREATE USER IF NOT EXISTS "...
3 votes
1 answer
4k views

How can I grant permissions on tables created in the future to members of a particular role?

I would like to create a role which will be granted to several individual users. This role should have full permissions on all tables, sequences, functions, etc. in a specified schema. When new tables,...
0 votes
1 answer
761 views

MySQL least privileges to get database/tables size

I'm using centreon_plugins to monitor some mysql databases. As a best practice I create a dedicated user for monitoring and I give it the least possible privileges. For simple monitoring I usually ...
0 votes
1 answer
7k views

NT SERVICE\MSSQL$SQLEXPRESS user cannot be found when added to network drive

For SQL Server 2016 Express, I would like to backup/restore directly to/from network storage I have mapped to drive S:. SQL Server Express runs under the (virtual?) account NT SERVICE\MSSQL$SQLEXPRESS ...
10 votes
2 answers
16k views

Explicitly granting permissions to update the sequence for a serial column necessary?

Recently I did create a table as a superuser including a serial id column, e.g., create table my_table ( id serial primary key, data integer ); As I wanted my non-superuser user to have ...
1 vote
2 answers
1k views

postgresql 9.* - user cannot SELECT from VIEW inside a SCHEMA as DEFAULT PRIVILEGE

hope you can help me. I have 3 users First is me, the db admin. I run the GRANT queries, I can do anything. (name doesn't matter now) Second is the data manager user. = manager_u Third is the data ...
1 vote
2 answers
70 views

PostgreSQL 11 - Can I turn a schema into the wild west?

I have been given a task to set up a development database where all users able to access a given project schema (each project would have its own schema) would be able to do anything to any table, ...
13 votes
3 answers
12k views

PostgreSQL 9.3.13, How do I refresh Materialised Views with different users?

[I think the root cause of this problem is me not understanding permissions and privileges...] So, to set the stage, the set up I have is a DB, call it MyDb. I have two users, spu1 and u1, spu1 is a ...
0 votes
2 answers
3k views

How to connect to remote MySQL from a specific IP?

I have two IPs (192.168.13.1 and 192.168.13.2) in my Server A and have provided select access to another Server B for secondary IP/virtual IP (192.168.13.2). mysql> show grants for web_app@192....
1 vote
1 answer
2k views

grant permission to SHOW FIELDS

I create a user to make a dump twice a week but when I try to execute mysqldump I have this error mysqldump: Couldn't execute 'SHOW FIELDS FROM `contabilidad_amortizaciones_completas_por_id_vista`': ...
0 votes
1 answer
36 views

How to grant read-write access to a user within the whole database cluster?

I got a database cluster with 1300 databases. I created a role and a user and granted access using the command GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO myuser, so myuser ...
15 votes
2 answers
49k views

Grant SELECT on all tables in Redshift

I am trying to assign SELECT privilege to a group in Redshift. So I created a group and a user in that group: CREATE GROUP data_viewers; CREATE USER <user> PASSWORD '<password>' IN GROUP ...
4 votes
2 answers
11k views

What are SHOWPLAN permission security risks? (MS SQL Server)

I'm having some friction when it comes to showplan permission security. Say there are 5 databases on a server. And each one has a test/ production split (so 10 total). There is one sysadmin. There ...
0 votes
1 answer
27 views

Postgres Materialized Views keeps getting dropped every time underlying views is updated

I am using Postgres as my DB and I have a bunch of Materialized Views that are created from a view. The MVs are in Schema B and Views are in Schema A. They are created like create SchemaB.mv1 as ...
3 votes
2 answers
217 views

Permission hierarchy vs. WITH GRANT OPTION

I have an Azure SQL database with this security setup: SchemaUpdater user with db_ddladmin, db_datawriter, and db_datareader roles. The user is used to execute database change scripts during ...
3 votes
2 answers
3k views

db2_install do not have write permission on the directory or file

This is the error I encountered (I ran the db2_install and everything else as root,): DBI1288E The execution of the program /home/DB_SERVER/ibm/db2/v10.5 failed. This program failed because ...
0 votes
1 answer
46 views

How to allow remote MSSQL user to bulk insert my local txt file?

I have a txt file on my local PC. I run localy Java app which connects to remote MSSQL. Now I need to bulk insert from that text file into my database table. However, SQL login can't read my file. I ...
0 votes
1 answer
2k views

MySQL: Privileges to view Views/Stored Procedure for user Regardless of Host

I've created stored procedures on a (remote hosted - DreamHost) MySQL Database using the HeidiSQL client. One problem i seem to have is that viewing/editing the content of stored procedures is only ...
1 vote
1 answer
579 views

MariaDB: granting access to a DB before creating the DB

I've just discovered that I can create a user and grant right to it on a given database even if that DB doesn't exist yet (it will be created in a second step). MariaDB [(none)]> CREATE USER foo2@...
0 votes
1 answer
121 views

MongoDB: Privileges on objects created by me only?

Is it possible to define a custom role, or otherwise assign privileges to allow a user read/write access only on objects that they have created? Imagine 3 applications, each having its own login. For ...
0 votes
1 answer
47 views

Restrict access to a new schema to a specific role despite users having db_datareader?

I'm working in a SQL Server 2016 database that is not of my design nor can I fundamentally change the security structure. I know it is likely trash/worst practice but I have to play the hand I am ...
0 votes
0 answers
49 views

How to use "with execute as" while querying a linked server from SQL Server

I have a strange permission issue with SQL Server 2019 (same thing happened also with 2016 version). I have a database ReportDB, where reportuser (login: reportlogin) can run several reports. I also ...
0 votes
1 answer
251 views

mysql 8 ndbcluster distributed privileges

I've setup a mysql 8 ndbcluster but cannot get the distributed privileges working. following how to setup distributed privileges using NDB_STORED_USER (https://dev.mysql.com/doc/refman/8.0/en/mysql-...
0 votes
1 answer
27 views

Grant All on All tabes in schema?

I have a question about grants... I ran the following command, assuming it would allow me to make any changes to the tables in the public schema: grant all on all tables in schema public to User1; ...
1 vote
2 answers
1k views

MySQL do not accepts wildcard for tables name level grant

Trying to grant a user select privilege on multiple tables using wildcards as following: GRANT SELECT ON 'DBname'.'foo_%' TO 'username'@'%' IDENTIFIED BY 'password'; But keep giving the following ...
0 votes
1 answer
134 views

Query for: view users and permissions (roles) from root security folder (MS SQL)

On the Internet I found a lot of scripts how to display users and their permissions under a particular database (Security folder under table) - for example sp_helpuser. Currently, however, I need to ...
10 votes
2 answers
9k views

PostgreSQL GRANT ALL on mutliple tables using LIKE

I have more than 100 tables named public.test_* How can I easily GRANT ALL access to the user test to all that tables at once? I tried with: GRANT ALL ON TABLE public.test_* TO test; But it is not ...
1 vote
1 answer
253 views

Error when using general and specific GRANT

I'm having troubles with GRANTs when trying to use particular permissions on specific database. There's an user that needs SELECT on all schemas starting with some text; and INSERT, SELECT, UPDATE, ...
3 votes
2 answers
422 views

Cross database reference select access with disabled login for DB user

We have two databases (DB1, DB2) with the following view structure. DB1: T1, T2, T3, ..... Tn (Tables) V1 (View consuming {T1, T2, T3 ..... Tn }) Inside DB2 we have to create a view V2 which will ...
2 votes
1 answer
38 views

Error trying to add a login to Azure SQL Special Role 'dbmanager'

Upon running these commands on an Azure SQL instance: CREATE LOGIN test WITH PASSWORD=N'Passw0rd' GO ALTER ROLE dbmanager ADD MEMBER test GO ... I'm getting an error: Cannot add the server principal ...
1 vote
1 answer
2k views

How to check who has permission to execute a stored procedure?

I have two environments/servers. Each has two databases, say DATABASE_A and DATABASE_B. There is a stored procedure in DATABASE_A (in both environments) that queries DATABASE_B and also calls multiple ...
2 votes
1 answer
158 views

How add user with same privileges?

There is a database owner, I need to add another user with the same privileges. With rights to update/delete/alter, etc. How can I do it?
0 votes
1 answer
729 views

GRANT ROLE TO USER in MySQL

I created one role QI_RO, granted all privileges on all schemas on the server and I was trying to grant role privilege to another user but throwing error. GRANT QI_RO to test_user@'%'; Error Message: ...
0 votes
1 answer
873 views

Mysql grant limited by IPv6 subnet

I want to permit access to a mysql server over IPv6 and limit access to the particular account to our ULA subnet we are using (fdd7:03d7:6247::/48). The manual seems to suggest that wildcards are ...
0 votes
1 answer
2k views

Designing a database structure for a permissions system

Scenario I would now like to implement a permission system so that a user is able to restrict access on his contact properties to his connections, e.g.: A wants to allow B to access his name, ...
0 votes
1 answer
283 views

No permissions to the certificate file when trying to restore a DB from a third party

I am trying to restore a Db in SQL server 16. It is a developer version installed on windows 10 laptop. We have a backup file from a SaaS instance. We have moved to a new instance of the SaaS and this ...
0 votes
3 answers
794 views

Cascading REVOKE not working in MYSQL

I've read about an SQL option of cascading permissions when issuing a REVOKE statement. I've googled for how this option is implemented in MySQL, but haven't found it at all. This is the docs page ...
1 vote
0 answers
26 views

Maria DB limiting root user privileges

I am logged in as the root user in Maria DB and I cannot grant view access to a service account user. Can anyone explain a cause or suggest a fix?
8 votes
4 answers
51k views

Cannot GRANT privileges as root

Because of having some problems, I decided to re-create all users except for root@localhost. This works fine, but the newly created user has no right to do anything. What I want is to simply give all ...
1 vote
1 answer
632 views

Granting specific permissions on ALL tables

I have a tutorial that users need to type in PostgreSQL commands. I don't give the script to users simply because it's a learning experience. Everything in the script below is typed in except for the ...
0 votes
1 answer
203 views

MySQL Proxy on Current User

I'm trying to grant permissions to the current user logged in depending on their role, but it doesn't seem possible to have a select statement at the end of the GRANT PROXY # TO # command The code I ...
0 votes
2 answers
46 views

Oracle: a litte confused about privileges granted to my user

I want to give few permission to my non-dba user on my database. I give create session, create table, view, etc.. This query seems to confirm SELECT privilege from USER_SYS_PRIVS; PRIVILEGE --...

1
2 3 4 5
30