access-denied

GetNamedSecurityInfo returns ERROR_ACCESS_DENIED(5) when writting owner of a remote Windows shared folder

亡梦爱人 提交于 2019-12-04 21:59:28
I'm a Domain Admin and I want to take ownership of some shared folders on some server of my domain programmatically in API(for example C++). I did some reading work and found that a Domain Admin is in the member machine's Local Admins group by default, and the Local Admins users can take ownership anyway. I just wrtie some code in this way but still encountered ERROR_ACCESS_DENIED when getting the owner sid using GetNamedSecurityInfo? Where's the problem? Something interesting is: When I changed the GetNamedSecurityInfo's secound argument from SE_FILE_OBJECT to SE_LMSHARE, it would succeed

Grey ribbon on Account form in IE “SCRIPT5: Access is denied.” in PageLoader.js

旧城冷巷雨未停 提交于 2019-12-04 20:19:01
MS CRM 2011 on premise. No problems if accessed via internal address: crm:5555 Go to crm.ourcompany.co.uk:5555 in IE and load account page and the ribbon is totally grey. (Not disabled - every pixel is the colour grey.) In Chrome and Firefox the ribbon is loaded fine. Browser console in IE, Chrome and FF all say access errors. I can see they are trying to access crm:5555. IE says: SCRIPT5: Access is denied. PageLoader.js, line 1 character 1226 The second line above is presented as a link. Clicking it shows me this: http://pastebin.com/bBadk9HS The full path is http://crm.ourcompany.co.uk:5555/

Unsafe JavaScript attempt to access frame, when try to upload file with ajax

痞子三分冷 提交于 2019-12-04 19:32:20
My goal is to upload file with ajax-way. I use this javascript library http://valums.com/wp-content/uploads/ajax-upload/demo-jquery.htm There is a link on my page like "Upload" button on example page. When I click it, "Open file" dialog is open. I choose file and form is automatically submitted. This is my javascript code. var upload_btn = $('#upload-opml'); new AjaxUpload(upload_btn.attr('id'), { action: upload_btn.attr('href'), name: 'opml', onComplete: function (file, response) { // } }); This is server code in Ruby on Rails. def upload_opml render :text => 'hello' end Headers, taken from

How do I set up Tomcat with authentication in LDAP?

人走茶凉 提交于 2019-12-04 18:41:54
"How to use LDAP for authentication in Tomcat with Custom Authorization" "LDAP authentication via web.xml in Tomcat" "LDAP Authentication Requirements and How to do it" I seem to not be the only one struggling with this issue. With the current configuration, I can authenticate with my LDAP users and not with system or tomcat users. The problem is that whenever I'm logged in, I'm denied access to the files I should see. I currently have a web.xml with the following info <security-constraint> <web-resource-collection> <web-resource-name>Nrt</web-resource-name> <url-pattern>/*</url-pattern> </web

Selenium python - Acess denied to /hub/session when launching Firefox webdriver

佐手、 提交于 2019-12-04 11:48:38
I just recently started using Selenium Webdriver (as opposed to Selenium 1.0), and I am struggling with an issue that prevents me from running tests at all: When trying to launch webdriver.Firefox() i get an WebDriverException, see traceback Exception occurs when initializing the Firefox webdriver: driver = webdriver.Firefox() After some research (where I found no posts about the same issue), I suspected that the company proxy was to blame, and defined a custom FirefoxProfile to configure a proxy for the webdriver, but that did not help either (tried both "no proxy" and manual proxy settings,

Access Denied trying to purge printqueue in C#

天涯浪子 提交于 2019-12-04 04:02:00
I'm trying to make a method in C# that empties all items in a print queue. Below is my code: LocalPrintServer localPrintServer = new LocalPrintServer(PrintSystemDesiredAccess.AdministratePrinter); PrintQueue printQueue = localPrintServer.GetPrintQueue(printerName); if (printQueue.NumberOfJobs > 0) { printQueue.Purge(); } When this code runs, on the localPrintServer constructor, the app throws this error: "An exception occurred while creating the PrintServer object. Win32 error: Access is denied." That constructor has a few overloads (including sending no parameters). Trying any of those, I get

How can I copy/replace a DLL?

好久不见. 提交于 2019-12-04 03:22:49
I have a utility which updates applications by simply copying/replacing the executables. Now, I have some DLL files which need to be updated as well. However, sometimes Windows will not let me replace it because something is using it, and sometimes there's so many things using the DLL that I cannot guarantee it will be unlocked for me to replace it. Currently, my only work-around is to re-name the existing DLL first, and then I can copy the new one in its place. But then the old DLL gets left behind with an altered file name. How can I replace a DLL programatically in this situation? Your

CreateProcess succeeds, but GetLastError() returns access denied

淺唱寂寞╮ 提交于 2019-12-04 02:01:40
问题 I'm having a little confusion due to conflicting return values from CreateProcess() and GetLastError() . When I use CreateProcess() in a manner similar to below, it succeeds and appears to accomplish its required tasks. Yet, GetLastError() still returns Access is Denied. If access is denied, why is does it appear to complete the task. In contrast, if CreateProcess() succeeds, why is GetLastError() returning access denied? Or is my use of GetLastError() incorrect? Am I only supposed to use it

Access denied when creating registry key in C#

孤街浪徒 提交于 2019-12-03 22:10:30
问题 I am trying to create a registry key at following location but I am getting access denied error: HKEY_LOCAL_MACHINE\SOFTWARE\MyCompany\MyProgram Here is the code: RegistryKey reg; reg = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\MyCompany\MyProgram"); 回答1: You are most likely using User Account Control (UAC). This means that even if you are an administrator your access token doesn't have the necessary privileges to do things like creating registry keys in HKEY_LOCAL_MACHINE . However, by

Access denied for user 'username'@'localhost' (using password: YES) in C:\\webdev\\wamp\\www\\membershipSite\\classes\\Mysql.php on line 9

笑着哭i 提交于 2019-12-03 15:19:54
I'm new to all of this but I do know a decent amount of HTML/CSS. I want to create a login server and I got most of the code from a video. If someone could help me and explain thoroughly so I can understand it would be greatly appreciated. If any other stuff is needed I will gladly post it. <?php require_once 'includes/constants.php'; class Mysql { private $conn; function _construct() { $this->conn = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME) or die('There was a problem connecting to the database.'); } function verify_Username_and_Pass($un, $pwd) { $query = "SELECT * FROM users WHERE