permissions

Execute a stored procedure as another user permission

谁说我不能喝 提交于 2019-12-08 14:34:04
问题 I faced the following problem: there's a user who has to execute a stored procedure (spTest). In spTest's body sp_trace_generateevent is called. sp_trace_generateevent requires alter trace permissions, and I don't want user to have it. So I would like user to be able to execute spTest. How can I do that? 回答1: Try this: EXECUTE AS user = 'special_user' EXECUTE YourProcerdure REVERT see these: Understanding Context Switching <<<has examples of things like you are trying to do Understanding

Checking the permissions of a shared folder on another Windows failed with access denied?

一个人想着一个人 提交于 2019-12-08 13:01:48
问题 i'm writting some c++ code retrieving the permissions of shared folds in another computer, by "permissions" i mean something like which user or group is permitted or denied to this folder. Here's the function to get the NTFS security descriptor of a shared folder(named strFileName) in a certain remote machine(named strServerName whose ip is strServerIP).The question is when i delete the "Everyone" account in the "Share" tab of the folder, the GetNamedSecurityInfo function would fail with

Permission differences between windows service and console application

此生再无相见时 提交于 2019-12-08 12:39:29
问题 I'm developing an application with a smart card involved (digital signature). Let's assume that we have the same code in this two contexts: Console application, executed by Administrator user Windows Service, executed by Administrator user I suposed that if this two codes were executed by the same user they would have the same privileges. It seems that this is not true. When I try with the Windows Service (Executed with Administrator user) i receive TargetInvocationException

Permission denied for git init

烂漫一生 提交于 2019-12-08 12:24:48
问题 git init can't run in /var/www/html/wp I do as Ding says in the web. usermod -a -G www-data username usermod -a -G www-data debian8 It takes no effect at all. Why can't I run git init in my /var/www/html/wp ? 回答1: You can also change the umask in your .profile in your home directory: # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. # umask 022 umask 002 What this does is set the initial perms for any new

Write file in C:\ drive permission issue [closed]

懵懂的女人 提交于 2019-12-08 11:56:23
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . i have developed a win application with c# which generate file in a folder in c:\ drive. when try to generate file there then problem occur for permission issue but when the application generate file in other drive than C:\ then no problem occur. so when i will distribute my apps setup to end user

How to check if a BroadCast Sender has a custom permission to send it

会有一股神秘感。 提交于 2019-12-08 10:23:29
问题 I have a plugin for my app that is started with a BroadCast. I already managed to add a custom permission, so only apps with the permission can receive the broadcast. However, I have no idea how to achieve the more important part: How can I check, if the sender has a custom permission, so only my main app can send the broadcast? I know this is possible, but I don't know how to do it. Thanks! 回答1: Try using: Context ctx = ...; int result = ctx.checkCallingPermission("your.permission.goes.here"

Google Script Full Account Access

元气小坏坏 提交于 2019-12-08 10:06:40
问题 So, I am writing a Google Apps Script, but every time I change the script to do something new, it needs to be reauthorized. Is there a way to "pre-authorize" all of these permissions for a script so that you no longer need to be prompted? I know that the highest level of permissions that can be given to an app is "Full account access", so if anyone knows how to give a script that level of permission, I would really appreciate finding out. 回答1: If you really want to get a script authorized for

Cannot see extra Facebook permissions in created user in Meteor

孤街浪徒 提交于 2019-12-08 10:00:30
问题 I am developing an App with Meteor and asking for extra permissions from Facebook with the following code... Accounts.ui.config({ requestPermissions: { facebook: ['user_likes', 'user_education_history', 'user_hometown', 'user_location', 'user_website', 'user_work_history'] }, passwordSignupFields: 'USERNAME_AND_OPTIONAL_EMAIL' }); I as an Admin is allowing for those permissions to be published but when the user is created, these permissions do not get added to the Meteor.user. Is there

chmod 777 -R on existing path getting chmod: -R: No such file or directory

社会主义新天地 提交于 2019-12-08 09:31:31
问题 I wanted to grant operation access using sudo chmod 777 -R <path> on mac, I double checked the given path, and it's existing and no typos, but I still got chmod: -R: No such file or directory . Any ideas about why I'm getting this error? 回答1: If you look at the synopsis from the man page for chmod you will se the following: SYNOPSIS chmod [OPTION]... MODE[,MODE]... FILE... chmod [OPTION]... OCTAL-MODE FILE... chmod [OPTION]... --reference=RFILE FILE... The -R flag should be used before the

C# Random Exception when Getting / Setting Registry ACL “SeSecurityPrivilege”

谁说我不能喝 提交于 2019-12-08 09:08:32
问题 I've been getting a completely random exception, I can run the same set of code 1000 times (each "run" is a full end-end of the program and thus starts as its own process from commandline and then exists) and get it fail once, or even 150 times. And I mean I can run it back-back over and over and it will fail completely randomly. System.Security.AccessControl.PrivilegeNotHeldException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation. at