privileges

Providing MySQL users with just the minimum privileges

淺唱寂寞╮ 提交于 2019-12-04 15:46:53
问题 For a web application, when creating the user which will connect to the MySQL database, you have the choice of privileges. Assuming that the only actions intended to be done by that user are SELECT/INSERT/UPDATE/DELETE, it seems to make sense to only provide those privileges, however I've never seen that recommended anywhere - what are the reasons for and against this method? 回答1: There are other privileges that a user might need during an ordinary application, for example: CREATE TEMPORARY

Writing config file in C:\Program Files (x86)\MyApp\myapp.cfg, vs. Administrator privilege

╄→尐↘猪︶ㄣ 提交于 2019-12-04 14:29:16
问题 I have made an installer (using Inno Setup) for my software, which is finally installed in C:\Program Files (x86)\MyApp\myapp.exe as usual on Windows platform, and it works perfectly. A problem comes when my software tries to write its config file here : C:\Program Files (x86)\MyApp\myapp.cfg here a Permission denied error arrives ! The only solution I have found is "Run software as administrator", but I don't like this solution : I don't want to ask the final user to have to do "Run as

Cannot connect with the MongoDB superuser to the other databases from the terminal

天涯浪子 提交于 2019-12-04 10:22:42
I have defined a superuser in my admin database: $ mongo admin -u superuser -p 1234 MongoDB shell version: 2.4.6 connecting to: admin > db.system.users.findOne() { "_id" : ObjectId("52a9a8bd2db854b07d3960f1"), "user" : "superuser", "pwd" : "8c246ca972a74c8049b79771df9b718b", "roles" : [ "userAdminAnyDatabase", "dbAdminAnyDatabase", "clusterAdmin", "readWriteAnyDatabase" ] } But now I cannot connect to another database with this user: $ mongo mono -u superuser -p 1234 MongoDB shell version: 2.4.6 connecting to: mono Thu Dec 12 13:22:42.100 Error: 18 { code: 18, ok: 0.0, errmsg: "auth fails" }

Check Postgres access for a user

非 Y 不嫁゛ 提交于 2019-12-04 08:50:23
问题 I have looked into the documentation for GRANT Found here and I was trying to see if there is a built-in function that can let me look at what level of accessibility I have in databases. Of course there is: \dp and \dp mytablename But this does not show what my account has access to. I would like to see ALL the tables I have access to. Can anyone tell me if there is a command that can check my level of access in Postgres (whether I have SELECT , INSERT , DELETE , UPDATE privileges)? And if so

“Operation not permitted” while dropping privileges using setuid() function

孤人 提交于 2019-12-04 07:17:57
Why this simple programs that use os.setuid()/gid() fails? Is written in python but I think that is not a language relative problem (at the end are all the same posix system call): import os, pwd if os.getenv("SUDO_UID") and os.getenv("SUDO_GID"): orig_uid=int(os.getenv("SUDO_UID")) orig_gid=int(os.getenv("SUDO_GID")) else: pw = pwd.getpwnam("nobody") orig_uid = pw.pw_uid orig_gid = pw.pw_gid print os.getuid(), os.getgid(), os.geteuid(), os.getegid(), orig_uid, orig_gid os.setgid(orig_gid) os.setuid(orig_uid) It returns this exception: $ sudo python provgid.py 0 0 0 0 1000 1000 Traceback (most

Creating a Windows user account with java

天大地大妈咪最大 提交于 2019-12-04 04:53:55
问题 Is it possible to create/delete windows user account and set its privileges to make it admin account , simple user account or guest account using java code ? 回答1: It's been already 1 year when i asked this question and i forgot to post the answer. I'm sorry :) to create a user account we need administrative privileges by wrapping a manifest file with our program. the manifest file must have the same name as the program. this how this file should look like: <?xml version="1.0" encoding="UTF-8"

no privileges on tablespace 'USERS'

痴心易碎 提交于 2019-12-04 04:40:23
i have many tables that i can insert rows, but i get this error only for one table; Error starting at line 1 in command: INSERT INTO ERRORLOG (MESSAGE) VALUES ('test') Error report: SQL Error: ORA-01950: no privileges on tablespace 'USERS' 01950. 00000 - "no privileges on tablespace '%s'" *Cause: User does not have privileges to allocate an extent in the specified tablespace. *Action: Grant the user the appropriate system privileges or grant the user space resource on the tablespace. i am not expert on oracle but as i understood from the error message; 'USERS' tablespace is full and my user is

Grant database user folder access

给你一囗甜甜゛ 提交于 2019-12-04 04:02:18
问题 I'm trying to create a csv export of data from mysql using the following query: SELECT * INTO OUTFILE '/tmp/result.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n' FROM getfreepellets WHERE 1 And I get the following error: #1045 - Access denied for user '[username]'@'localhost' (using password: YES) (removed username but it's the right one) How would I go about granting access to this user to create a file on the server? Edit: I changed the

How to get admin privileges for editing app.config in C#?

柔情痞子 提交于 2019-12-04 02:06:26
问题 I've got a program which uses app.config for storing some preferences. The problem is that if the program is installed in C:\program files\<project name> then the changing of preferences is not possible due to the fact that all files in program files\<project name> are available only to administrator. My code: public static bool EditKeyPair(string key, string value) { bool success = true; // Open App.Config of executable System.Configuration.Configuration config = ConfigurationManager

Getting ORA-01031: insufficient privileges while querying a table instead of ORA-00942: table or view does not exist

点点圈 提交于 2019-12-04 01:40:03
When I'm querying a table in schema C from schema A, I'm getting ORA-01031: insufficient privileges and when I'm querying the same table from schema B, I'm getting ORA-00942: table or view does not exist . On the table neither of the schemas are having any privileges. Why am I getting different error messages in this case? You may get ORA-01031: insufficient privileges instead of ORA-00942: table or view does not exist when you have at least one privilege on the table, but not the necessary privilege. Create schemas SQL> create user schemaA identified by schemaA; User created. SQL> create user