permissions

How to change file permissions from Java 1.4.2?

荒凉一梦 提交于 2019-12-23 11:39:22
问题 I'm looking for a code fragment, using which I must be to change the file permissions on unix. My project runs on java 1.4.2 .. just a sample code example or methods which needs to be used will do.. Regards, Senny 回答1: You're not the only one: How to change the file's permission and last modified in Java? You could, in principle, use Runtime.exec("chmod ...") if the existing java.io.File methods aren't enough. But it wouldn't be portable. 回答2: You could also look at the Gnu ClassPath

Amazon s3 – 403 Forbidden with Correct Bucket Policy

雨燕双飞 提交于 2019-12-23 10:59:56
问题 I'm trying to make all of the images I've stored in my s3 bucket publicly readable, using the following bucket policy. { "Id": "Policy1380877762691", "Statement": [ { "Sid": "Stmt1380877761162", "Action": [ "s3:GetObject" ], "Effect": "Allow", "Resource": "arn:aws:s3:::<bucket-name>/*", "Principal": { "AWS": [ "*" ] } } ] } I have 4 other similar s3 buckets with the same bucket policy, but I keep getting 403 errors. The images in this bucket were transferred using s3cmd sync as I'm trying to

Granting execute permission on all stored procedures in a certain database

大憨熊 提交于 2019-12-23 10:46:10
问题 As the title suggests, I need to grant the execute permission on every stored procedure in a database. We've moved from test to production and have less control over the production database.. and all of the imported stored procedures got zero permissions right now. An interesting thing to know is if there is any way to make sure all of the imported stored procedures get execute permissions from the beginning? Thanks for any help. 回答1: Generate the statements, then copy them and paste into

Java Applet Permissions

左心房为你撑大大i 提交于 2019-12-23 10:09:39
问题 I've put together a basic applet where the user selects a file from their hard drive, it reads the first line of this file and passes that off to JavaScript for some additional preprocessing, and then when you click a button it tries to upload that file through an HTTP POST request. I found a very basic open source applet for uploading files that I copied and modified for this last bit. The trouble is, though, it doesn't quite work. It seems like it's running fine, but then I run into two

Using Aptana Studio to import git project but Permission denied (publickey)

≯℡__Kan透↙ 提交于 2019-12-23 09:58:55
问题 I tried to import an existing project from the github repository into aptana studio but an error says Permission denied (publickey). fatal: The remote end hung up unexpectedly I made sure to add my ssh to my account in github. I also ran $ssh -vT gitt@github.com and this is what it says that the private key cannot be found. On other windows 7 machine I never had a problem importing a Git project but on my home PC I can't get it to work. 回答1: Apparently this has to do with the proper ssh -

Error when attempting to write to event log - Cannot open log for source 'SourceName'. You may not have write access

▼魔方 西西 提交于 2019-12-23 09:56:20
问题 We're currently trying to integrate existing classic ASP pages into our new method of logging to the event log. We're achieving this by calling a .NET assembly exposed as a COM object which does the actual logging to event log. This all works correctly, however when we try to write to the event log we get an error "Cannot open log for source 'SourceName'. You may not have write access.". The logging code itself works when calling from an aspx page. This obviosuly appears to be a permissions

Executable script gets permission denied on Linux box

橙三吉。 提交于 2019-12-23 09:55:49
问题 trying to run a script on Ubuntu 14.04. $ bash MirroirHome runs fine but $ ./MirroirHome bash: ./MirroirHome: Permission denied $ ls -l total 32 -rwxr-xr-x 1 gerald gerald 214 nov 14 15:44 MirroirHome I am the owner of the file and the permission bit is on, what is going on?? Here is the script in case it matters. #!/bin/bash rsync \ --archive \ --verbose \ --compress \ --update \ --delete \ /home/ /media/Data/MirroirHome 回答1: This can happen if the partition is mounted with the noexec flag

Error when attempting to write to event log - Cannot open log for source 'SourceName'. You may not have write access

蓝咒 提交于 2019-12-23 09:55:12
问题 We're currently trying to integrate existing classic ASP pages into our new method of logging to the event log. We're achieving this by calling a .NET assembly exposed as a COM object which does the actual logging to event log. This all works correctly, however when we try to write to the event log we get an error "Cannot open log for source 'SourceName'. You may not have write access.". The logging code itself works when calling from an aspx page. This obviosuly appears to be a permissions

Accessing a USB device with libusb-1.0 as a non-root user

主宰稳场 提交于 2019-12-23 09:29:05
问题 I am trying to interface with a USB device as a non-root user on RHEL5. The device is a GPIO interface (its documentation can be found at http://www.xdimax.com/sub20/sub20.html) which uses libusb-1.0. The procedure for opening the device, using its API, is: sub_device d; d = sub_find_devices(0); sub_handle h = sub_open(d); When I do this, the sub_find_devices() call works, but on the sub_open() call, I get the libusb error -3, which indicates that I do not have permissions to open the device

How to test file permissions using node.js?

﹥>﹥吖頭↗ 提交于 2019-12-23 09:21:34
问题 How can I check to see the permissions (read/write/execute) that a running node.js process has on a given file? I was hoping that the fs.Stats object had some information about permissions but I don't see any. Is there some built-in function that will allow me to do such checks? For example: var filename = '/path/to/some/file'; if (fs.canRead(filename)) // OK... if (fs.canWrite(filename)) // OK... if (fs.canExecute(filename)) // OK... Surely I don't have to attempt to open the file in each of