w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Deleting logs file in Amazon s3 bucket according to created date
You can use S3's Object Lifecycle feature, specifically Object Expiration, to delete all objects under a given prefix and over a given age. It's not instantaneous, but it beats have to make myriad individual requests. To delete everything, just make the age small. http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html

Categories : Asp Net Mvc

Unable to see access logs in my Google Storage Bucket
cloud-storage-analytics@google.com needs to have write permission for your LogBucket as described here: https://developers.google.com/storage/docs/accesslogs

Categories : Rest

Rails AssetSync and AWS s3 Bucket Access Denied
By default, objects on S3 are "private" -- they are only accessible if you prove to "own" those objects by providing some credentials in the query string. To make the objects publicly accessible (ie, without having to sign the requests), you need to attach a policy to the bucket. To add that permission, go to S3 on the AWS Management Console, click on your bucket, select Properties, and there you will see "Permissions". Try that.

Categories : Ruby On Rails

Using Node.js to create bucket and push object, extra blank file created?
var s3bucket = new AWS.S3({params: {Bucket: 'test_bucket/sub_bucket'}}); will create an extra file. Take out the params in the parentheses. I found out that Amazon's quick start guide example creates an extra file. This way is the correct way to do it. // Create a bucket using bound parameters and put something in it. var s3bucket = new AWS.S3(); s3bucket.createBucket(function() { var params = {Bucket: 'bucket/sub-bucket', Key: 'file_name1', Body: 'Hello!'}; s3bucket.putObject(params, function(err, data) { if (err) { console.log("Error uploading data: ", err); } else { res.writeHead(200, {'Content-Type':'text/plain'}); res.write("Successfully uploaded data to bucket/sub-bucket/"); res.end() } }); });

Categories : Node Js

Error executing aapt: Cannot run program, CreateProcess error=5, Access is denied: CreateProcess error=5, Access is denied
Go to your eclipse folder, open eclipse.ini and add the lines -vm C:Program FilesJavajdk1.6.0_29jreinserverjvm.dll Replace jdk1.6.0_29 with the version code of your jdk. These lines should be added above -vmargs

Categories : Android

Amazon S3 Bucket and Folder Policy for IAM access?
{ "Version":"2012-10-17", "Statement": [ { "Sid": "AllowUserToSeeBucketListInTheConsole", "Action": ["s3:ListAllMyBuckets", "s3:GetBucketLocation"], "Effect": "Allow", "Resource": ["arn:aws:s3:::*"] }, { "Sid": "AllowRootAndHomeListingOfCompanyBucket", "Action": ["s3:ListBucket"], "Effect": "Allow", "Resource": ["arn:aws:s3:::yourbucketname"], "Condition":{"StringEquals":{"s3:prefix":["","yourfoldername/"],"s3:delimiter":["/"]}} }, { "Sid": "AllowListingOfUserFolder", "Action": ["s3:ListBucket"], "Effect": "Allow", "Resource": ["arn:aws:s3:::yourbucketname"], "Condition":{"StringLike":{"s3:prefix":["yourfoldername/*"]}} }, { "Sid": "AllowAllS3ActionsInUserFolder", "Effect": "Allow",

Categories : Amazon

AWS IAM - allow access with temporary password to specific bucket
You can do this with pre-signed query string authentication: http://www.bennadel.com/blog/2488-Generating-Pre-Signed-Query-String-Authentication-Amazon-S3-Urls-With-User-Specific-Data.htm

Categories : Dotnet

Amazon S3 Bucket Policy Permissions Don't Allow Dropbox API to Pull Files from Bucket
I assume, because you mention passing a URL to Dropbox, that you're using the Saver? If so, you can tell the Saver what file name to use, so give it the authorized URL and specify a filename so there's a file extension. E.g.: <a href="https://...?AWSAccessKeyId=..." class="dropbox-saver" data-filename="myfile.txt"></a> or, in JavaScript: Dropbox.save('https://...?AWSACcessKeyId=...', 'myfile.txt'); When you say that "because the file then doesn't end in an extension Dropbox recognizes so it again fails to work," what do you mean, exactly? What goes wrong when the file doesn't have an extension?

Categories : PHP

SSRS 401.3 error access denied due to Access Control Lists
Solved! After granting the appropriate AD group read & execute rights on C:Program FilesMicrosoft SQL ServerMSRS10_50.MSSQLSERVERReporting Services the 401 disappeared!! My users can connect to the report server and my .NET app can connect to the report service / asmx Don't know what triggered it and why it's necessary to grant access on the file system but it's a quick relief compared to my alternatives.. Regards, Mike

Categories : Sql Server

Amazon S3 Bucket Policy: How to lock down access to only your EC2 Instances
I have investigated this further and come up with a simpler solution for security through obscurity. I am using really long UserAgent strings as Auth. this makes the bucket policy look like: { "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::[REPLACE WITH YOUR BUCKET NAME]/*", "Condition": { "StringEquals": { "aws:UserAgent": "deployPackages-4d8ae3a6-6efc-40dc-9a7c-bb55284b10cc-4d8ae3a6-6efc-40dc-9a7c-bb55284b10cc" } } } ] } more details: http://www.diaryofaninja.com/blog/2013/07/24/scorched-earth-deployments-on-amazon-ec2-teamcity-amp-web-deploy-ndash-part-1-amazon

Categories : Amazon

PDO access denied to external host, but I can access to phpmyadmin cp
Nothing seems wrong with your code except the setAttribute method is setting the error output to raise warnings.. but you're in a try/catch block.. so you may want to consider using PDO::ERRMODE_EXCEPTION. Secondly, check your remote permissions for that username/password. There may be an IP limitation for that user account. You can use the wildcard % for the HOST on user accounts or (suggested) provide the server IP that is connecting TO the database.

Categories : PHP

Web Deploy Command Line Logs in Event Logs (Updated / Inserted / Deleted Files) in event logs
I don't believe you can log the activities to the event log, but what you can do is use the -xml parameter to output the changes in XML format. You could then use this to log to the event log via a Powershell script, for example.

Categories : Iis

Access private content via query string to s3 bucket via Route53 A record
I performed the following tasks: Created a bucket in Amazon S3 named images.my-domain.com Uploaded a file into the bucket Created a Record Set in Amazon Route 53 (A record, Alias = Yes, Alias Target = s3-website-ap-southeast-2.amazonaws.com -- yes, I'm in Sydney too) Test 1 - Direct access: Clicking the object link in Amazon S3 (s3-ap-southeast-2.amazonaws.com/images.my-domain.com/picture.jpg) returned AccessDenied as expected, since there are no permissions on the object. Test 2 - Direct Pre-Signed URL: Using a Pre-Signed URL (created via BucketExplorer) on the object in S3 (using the normal S3 URL) successfully provided access to the object. This is to be expected. Test 3 - Alias access: Accessing the object link in Amazon S3, but changing it to use the domain name directly (images

Categories : PHP

on s3 upload to a bucket, trigger s3 copy to a different bucket
This answer can help you: Notification of new S3 objects The summary is that, at this moment, there is no notification of new objects except for s3:ReducedRedundancyLostObject event. The official documentation is here: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTnotification.html The solution is to implement the logic in your code or poll the bucket.

Categories : Amazon

Access browser logs in Selenium?
You could inject javascript and override the log function (as reading the log is not permitted from JS). See http://tobyho.com/2012/07/27/taking-over-console-log/ for an example and there are many SO questions on this topic. The problem with this is that it still can't get the logs which happened prior to injection. It gets easier if you override this in the test deployment directly.

Categories : Python

I can't access unc path from C#. Getting access is denied
Had this very same problem a while ago. For your debug process to run with full Admin access, you'd have to open Visual Studio with full admin access. In production, have your process "Run As Administrator". If you do not do any of the above, you will have to implement impersonation.

Categories : C#

Tomcat access logs - are failed requests included?
It is more likely that your Tomcat process is leaking memory until it got no more free memory. Try to log the heap size with each request, and then notice if it keeps growing. The tomcat class loader can leak memory, especially if you use the "automatic deploy" feature. long freeMem=Runtime.getRuntime().freeMemory(); long maxMem=Runtime.getRuntime().maxMemory(); long totalMem=Runtime.getRuntime().totalMemory(); And then log freeMem/MaxMem and totalMem. If max keeps growing you got a leak. Edit: And to answer your question. That depend on exactly how tomcat fails, and how you have set up logging. But with our system(A rather default apache mod_proxy=>tomcat, there are some fatal tomcat errors which are only logged in catalina.out

Categories : Java

MVC "Access is Denied" using IIS
When creating your MVC application, one option is to create an "Intranet" application. This will turn on "Windows" authentication by default inside Web.config. When publishing such a project to IIS, you need to enable Windows authentication for your application in the IIS Management Console. You may also have to disable Anonymous authentication.

Categories : Asp Net Mvc

Getting Logs from child project created in Jenkins Parameterized Build Plugin for Email Ext plugin
Ok so i got the solution. I need to discard the Pramaeterized plugin but now is using the Build flow Plugin [https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin] The benefit is it is giving me the log to be placed in the parent job without any modification in the child project. the usage is as follows: def today = new Date() out.println '----------------- Build Started At '+ today+ '----------------------------' b=build("<BaseBuild>",ParentWorkSpace:build.properties["workspace"],Param:"Value") today=new Date() out.println '-------- Build Log -------------- ' out.println b.log out.println '----------------- Build Ended At '+ today+ '----------------------------' This way i have full control and when i attach the log then i am attaching the original log in m

Categories : Jenkins

Import old apache access logs to webalizer - ignoring records
I ran into the same problem. I had just installed webalizer, and changed it to incremental mode (here are the relevant entries from my /etc/webalizer/webalizer.conf): LogFile /var/log/apache2/access.log.1 OutputDir /var/www/htdocs/w Incremental yes IncrementalName webalizer.current And then I ran webalizer by hand, which initialized the non-gz files in my logs directory. After that, any attempt to manually import an older gz logfile (by running webalizer /var/log/apache2/access.log.2.gz for instance) resulted in all of the entries being ignored. I suspect this is because the entries found in the gz logs were older than the last import- I had to delete my webalizer.current file (really I cleared the whole dir- either way should work). Finally, in reverse order (oldest first), I cou

Categories : Apache

I am testing my android application on my phone,and i want to access my camera and see the logs as well
Logcat is always available. And if you are opening Camera from your app then you can see Logcat messages so may be there are few reason as follows :- check if connect your device as usb debug mode. your device should not be connect as a media device. hope it will solve this issue

Categories : Android

Access is denied when using FileOutputStream
You have to have folders created first. But you can't call file.mkdirs() - you need to call file.getParentFile().mkdirs() - otherwise, you will create a folder with the name of the file (which will then prevent you from creating a file with the same name). I'll also mention that you should check the result code of mkdirs(), just in case it fails. And though you didn't ask for it, I'll still mention that you don't need to call createNewFile() (your FileWriter will create it). and, just for thoroughness, be sure to put your file.close() in a finally block, and throw your exception (don't just print it) - here you go: void writeToFile(String input) throws IOException{ File file = new File("C:\WeatherExports\export.txt"); if (!file.getParentFile().mkdirs())

Categories : Java

access denied when using winjs.xhr for ftp
IE's XMLHttpRequest object (which WinJS.xhr uses) doesn't support ftp protocol so that's why you get an error. Try using BackgroundDownloader class which supports ftp downloads.

Categories : Http

S3 TVM Issue – getting access denied
You don't need to use prefix to refer to the resource for the context of Object operations. I'd also recommend restricting the S3 actions. Here is a recommend policy, based on the one from an article on an S3 Personal File Store. Feel free to remove the ListBucket if it doesn't make sense for you app. {"Statement": [ {"Effect":"Allow", "Action":["s3:PutObject","s3:GetObject","s3:DeleteObject"], "Resource":"arn:aws:s3:::my-bucket-test/66-*", }, {"Effect":"Allow", "Action":"s3:ListBucket", "Resource":"arn:aws:s3:::my-bucket-test", "Condition":{ "StringLike":{ "s3:prefix":"66-*" } } }, {"Effect":"Deny","Action":"sdb:*","Resource":["arn:aws:sdb:u

Categories : Amazon

getJSON access is denied in IE
Sounds like a cross-domain-request issue. You are unable to use getJSON() to fetch data from another site due to browser policies. Check out this question for a workaround

Categories : Jquery

Access to this directory is denied
The only possible reason I can think of is you are not really the WoopyCat user, here is the correct way to get the path based of the currently running user. var roamingFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); //This equals the AppDataRoaming folder for the current user Directory.Move(Path.Combine(roamingFolder, ".minecraft"), Path.Combine(roamingFolder,currentUser));

Categories : C#

msxml3.dll Access Denied
Try with a more recent version: Set http = CreateObject("Msxml2.XMLHttp.6.0") It could also be an issue with your Internet security settings (see here). Open the Internet Options applet in the Control Panel, select the zone for the website (probably "Trusted sites") in the Security tab and click Custom level…. In the section Miscellaneous set Access data sources across domains to Enabled.

Categories : Vbscript

Access granted and denied
You could use the Console.ReadLine method which will return the value entered by the user and you could store it in the corresponding variable: namespace Password { class Program { static void Main(string[] args) { Console.WriteLine("Please enter password:"); string password = Console.ReadLine(); bool passWordMatch; passWordMatch = password == "Test"; if (passWordMatch) { Console.WriteLine(" Password Match. Access Granted"); } else { Console.WriteLine("Password doesn't match! Access denied."); } } } }

Categories : C#

Symfony2 - Access Denied
The doctrine relation annotations were wrong: /** * @ORMManyToMany(targetEntity="Role", inversedBy="users") */ private $roles; /** * @ORMManyToMany(targetEntity="User", mappedBy="roles") */ private $users;

Categories : PHP

Evenly Distribute items in a bucket( or having a property ) to another bucket(or array) following property
The following generates two arrays: $values contains the values, and $out contains keys in the form type1:3. The variable $max determines the maximum number of sets: $arr['type1'] = array(1, 2, 3, 4, 5); $arr['type2'] = array(6, 7, 8, 9); $arr['type3'] = array(10, 11, 12, 13, 14, 15); $arr['type4'] = array(16, 17, 18, 19); $arr['type5'] = array(20, 21, 22, 23, 24); $max = 5; $out = array(); $values = array(); $i = 0; foreach ($arr as $key1 => $type){ foreach ($type as $key2 => $item){ $out[$i%$max][] = $key1.':'.$key2; $values[$i%$max][] = $item; $i++; } } var_dump($values); [0] => array(1, 6, 11, 16, 21) [1] => array(2, 7, 12, 17, 22) [2] => array(3, 8, 13, 18, 23) [3] => array(4, 9, 14, 19, 24) [4] => array(5, 10, 15, 20) Or you ca

Categories : PHP

Python TweetStream Access Denied
Twitter released the next version of API (1.1). And tweetstream doesn't support it yet. See relevant issue on tweetstream project issue tracker.

Categories : Python

Access denied when trying to execute a .exe in %AppData%
I am not JAVA user but isn't it 32 vs. 64 bit issue ? on 64 bit Windows error code 5 usually means that executable is not 64 bit compatible sometimes this is the case even when executable need to access only some (older win) system directory which does not exist anymore To prove this try to use your executable in command line. if you can manage to get it work there than it is different issue. If not find executable for your OS. Another possibility is that the file has to be physically present on some drive. you wrote that you has it as temporary. not shore what it means for JAVA if it only copy it to some file and delete after use than its OK but if it is only in memory somewhere than that could be problem if executable need access to itself To prove this just copy the file to some

Categories : Java

CarrierWave Fog Credentials, Access Denied
I realized this has to do with the new AWS Identity and Access Management (IAM). I had created a new IAM user, but I hadn't given that user the correct privileges. In the past, there was only one user, and that user had admin privileges. Now you have to create a user, give that user the correct privileges, and use that user's credentials. I hope this helps someone.

Categories : Ruby On Rails

hornetq JMSException: access denied
You are running on a sandbox and you don't have the permission to perform the classLoading require by the ObjectMessage. Try relaxing the settings of your JVM's security sandbox, or sign the jar. Anyways it's not really a HornetQ issue. it's more a JVM security configuration thing.

Categories : Java

java.io.FileNotFoundException: (Access is denied)
Its because it seems like you are trying to open and read a directory here. Your file as you say it, doesn't have any extension specified so java takes it as a directory. use isFile() method to check for a file before opening. You can use listFiles() method to obtain files of the directory.

Categories : Java

Denied access to User Folder
check if the folder is read only (in windows) if it is, just clear the read only flag. if it isn't read only, make sure that the admin user has full rights on that folder. You can check this by right clicking on the folder --> properties --> security check out this link for more information on how to set it programatically: C# - Set Directory Permissions for All Users in Windows 7

Categories : C#

mount: nfs access denied by server
Is there a config file on the NAS where to put allowances for clients? E.g. in debian based OS the config file is "/etc/exports" and you would put there "/volume2/Asterisk_Recordings 192.168.1.1(rw,sync)" and activate this with "exportfs -a" (your NAS may do this automatically if you update the config via a web interface, I guess.) Check also Mounting NFS results in access denied by server.

Categories : Misc

Access to the path 'C:SitescontentServerIpAddress.txt' is denied
The account that is being used for the worker process of the web site has no (write)access to the file. Configure the file (or folder) so that the ASP.NET process has access. Another thing to look at is whether or not the path as stated in the code is the actual path on the server.

Categories : Asp Net

XDR post returning "access denied" in IE 8 & 9
I'm not exactly sure if this is how XDR works, but it works like this on my server for some reason, but it looked like 'open' triggered the ajax response from my .Net back-end, and blocked the send from getting through (It doesn't sound right, but that's is how it looked in Fiddler). So no form data was being posted, which caused all the weirdness to happen. To fix this, I changed the post to a get, and added a clause to my .Net Ajax Controller that said if Request.Form.AllKeys.Length = 0, get the query string instead.

Categories : Jquery

Getting Access Denied when trying to impersonate user
Unless you have a specific need to use the ANSI version of LogonUser, you should use LogonUser instead of LogonUserA in your declaration, i.e. Declare Function LogonUser Lib "advapi32.dll" You should also verify that the user being impersonated has interactive logon rights on the local machine.

Categories : Vb.Net



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.