permissions

How can my C program check if it has execution permission on a given file?

倖福魔咒の 提交于 2019-12-12 12:16:10
问题 Is there a way to determine if the process may execute a file without having to actually execute it (e.g. by calling execv(filepath, args) only to fail and discover that errno == EACCES )? I could stat the file and observe st_mode , but then I still don’t know how that pertains to the process. Ideally, I’m looking for a function along the lines of get_me_permissions(filepath, &status); // me: the process calling this function // when decoded, status tells if the process can read, write, and

How can I request the “publish_actions” permission?

三世轮回 提交于 2019-12-12 12:10:04
问题 Washington Post (https://www.facebook.com/dialog/permissions.request?app_id=225771117449558&display=page&next=https%3A%2F%2Fapps.facebook.com%2Fwpsocialreader%2F%3F&type=user_agent&canvas=1&perms=user_about_me%2Cuser_likes%2Cpublish_actions") is able to request the publish_actions permission. It says this on Facebook: While in Open Graph Beta, the 'publish_actions' permission can only be requested from developers and test users of your app. The 'publish_actions' permission will be ignored if

Cordova App 'Android permission Cordova plugin' is not showing permission dialog

人走茶凉 提交于 2019-12-12 12:05:11
问题 i am attending to use 'imagepicker' plugin for my cordova app to get images from the mobile gallery and use them . i am testing my app on android 6.0 device and this is the problem, marshmallow Android 6.0 require in run-time permission not like the older versions "it is working on older versions" ,but on api 23 or higher when it attend to open gallery it close immediately and the app crashes . when i searched i found that i need permission to do it . so i started to use "Android permission

Permissions for creating OAuth credentials in Google Cloud

回眸只為那壹抹淺笑 提交于 2019-12-12 11:11:09
问题 Using IAM, I am trying to allow certain users to access API's and allow them to create OAuth client credentials. Is there a predefined role for allowing this? I don't want to use the role of project editor, because I'm trying to allow access to only the necessary services. It's when the user is in their project, and they go to "APIs and Services" > Credentials, the user receives this error: You don't have permission to view API keys, OAuth clients, and service account keys. Roles/Permissions:

ASP.NET Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

旧时模样 提交于 2019-12-12 11:02:03
问题 I'm trying to publish an asp.net website on a remote server. When my code tries to connect to the database, I get the error message described in the question title. Now, I've gone into the Microsoft SQL Server Management Studio for SSE 2008 and can see the list of logins. NT AUTHORITY\NETWORK SERVICE is there, but I'm not sure what settings I need to change to allow this user to access the database. I've tried using impersonation in my web.config file using the windows login credentials for

How to debug ASP permission problems with WScript.Shell object?

僤鯓⒐⒋嵵緔 提交于 2019-12-12 10:54:14
问题 I have to run command line operation from some legacy ASP application. Here is my code: <% cmd = "%comspec% /c echo Hello" set wsh = CreateObject("WScript.Shell") ireturn = wsh.Run(cmd, 0, true) set wsh = nothing %> And here is result I am receiving: Microsoft VBScript runtime error '800a0046' Permission denied /test.asp, line 6 Do you have any idea how to make IIS6 to run this code? Note: Of course I don't have to run echo command but I want to exclude any additional causes of the problem.

How to open Perl file handle to write data via sudo (or as another user)

百般思念 提交于 2019-12-12 10:54:02
问题 I'd like to write data to a file, but the file handle should be opened with access permissions for a specific user. Thus, the following statement: open (FH, "> $filename") or die "$@\n"; would allow writing to a file as that particular user. Is there a way to do this within a Perl script, without the entire script being run with sudo -u $username ? 回答1: There are two established ways. Stackers, you are invited to edit this answer to fill in the drawbacks for each. Run the program with sudo .

Using Web Deploy tool for IIS - works with administrator account but not IIS or Windows user account

余生颓废 提交于 2019-12-12 10:48:22
问题 I am struggling with the massive beast that seems to be WMSvc - Web Management service for IIS. I am trying to deploy web sites from Visual Studio which is killing me. Actually it's killing everyone except me on my team, but since I am designated web server manager right now I'm the one thats feeling the hurt. It works when I deploy using my Admin windows account, which atleast means I should be on my way, but it doesn't work with another account that isn't admin or an IIS manager account.

Why does @INC change when setgid-bit of C wrapper around perl script change?

不羁的心 提交于 2019-12-12 10:38:59
问题 This is all on RHEL6 I am trying to run a perl script as a specific user (owner of the perl script) by wrapping it inside a C binary and then setting the setgid bit of the binary (ref: https://superuser.com/questions/440363/can-i-make-a-script-always-execute-as-root). The perl script uses various perl modules. If the perl modules are in PERL5LIB of the account trying to run the C binary, and the setgid-bit is NOT set on the C binary, it runs fine. If the setgid-bit IS set, then it fails

Named pipe client unable to connect to server running as Network Service

旧城冷巷雨未停 提交于 2019-12-12 10:38:06
问题 I have a service running under the Network Service account. The service just sets up a named pipe and listens for connections: NamedPipeServerStream listeningPipe = new NamedPipeServerStream("ourservicepipe", PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Message, PipeOptions.Asynchronous); listeningPipe.BeginWaitForConnection(OnPipeConnected, listeningPipe); I have an application running on a standard user account on the same machine. It tries to