permissions

access denied when trying to connect to mysql using tomcat datasource

一世执手 提交于 2019-12-08 03:11:27
I'm trying to connect locally to mysql 5 server in jsp page using tomcat 6 and datasource. I've configured everything as in the tomcat manual (web.xml, context.xml, etc.), but I get this exception: java.net.SocketException: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve) I checked the mysql and there is no problem with the connection itself, in fact I even succeeded connecting using direct JDBC connection (i.e. without using datasource). Do I need to set anything in the tomcat policy file? other ideas? Thanks I found a workaround,

FFmpeg executable Chmod permission

半世苍凉 提交于 2019-12-08 02:47:38
问题 Trying to run FFmpeg command using executable file stored in Raw folder eclipse for android app. I am getting permission denied error and not able to resize video. How can i give right permissions from my java file. 回答1: put this code in a static class or wherever you want: public static void installBinaryFromRaw(Context context, int resId, File file) { final InputStream rawStream = context.getResources().openRawResource(resId); final OutputStream binStream = getFileOutputStream(file); if

How to organize and manage an ACL?

旧城冷巷雨未停 提交于 2019-12-08 02:34:37
问题 Taking the Zend_ACL as my example, I'm wondering how this should be organized for a project. Sure the example is all nice and neat, but a real site is much more complex. $acl = new Zend_Acl(); $acl->addRole(new Zend_Acl_Role('guest')); $acl->addRole(new Zend_Acl_Role('member')); $acl->addRole(new Zend_Acl_Role('admin')); $parents = array('guest', 'member', 'admin'); $acl->addRole(new Zend_Acl_Role('someUser'), $parents); $acl->add(new Zend_Acl_Resource('someResource')); $acl->deny('guest',

Cannot read config data from HKEY_LOCAL_MACHINE on Vista

空扰寡人 提交于 2019-12-08 02:18:38
问题 We have a Java Web Start application and are trying to store application configuration data using HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER . We can get someone with admin rights to launch the app the first time and set the configuration, so that it will store the values in the registry successfully. Nevertheless, subsequent Vista users without admin privileges cannot seem to even read the values from the registry in HKEY_LOCAL_MACHINE . Perhaps our approach is incorrect, and there is a

“unlink permission denied” error trying to delete deleteme.txt

旧巷老猫 提交于 2019-12-08 01:52:43
问题 I want to delete deleteme.txt in the Ubuntu web server. So I made 4.php do the following: <?php unlink('deleteme.txt'); ?> deleteme.txt has the following permission status: -rwxrwxrwx 1 ubuntu ubuntu 19 Jun 12 06:18 deleteme.txt When I execute "4.php", this error always occurs Warning: unlink(deleteme.txt): Permission denied in /var/www/html/4.php on line 2 I already tried chmod 777 deleteme.txt and chown ubuntu /var/www/html on the directory which contains "deleteme.txt" I also tried chown

Basic permission in Bugzilla to separate clients

最后都变了- 提交于 2019-12-08 01:51:13
问题 I'm trying to configure a Bugzilla instance, which will allow my clients to login, and file bugs for their website under development/maintenance. For e.g: I have created 2 products called "TestProject", "TestProject2" and a user called "TestClient". What I'm trying to achieve is when TestClient logs in, he can only see TestProject, TestProject2 and only add/modify bugs in there. TestProject, TestProject2 should not be listed for any other client. I believe this has do with granular controls

Check if another user have the permission to write a File

倾然丶 夕夏残阳落幕 提交于 2019-12-08 01:32:54
问题 During an installation process I need to check if a userprovided path is writable to a specified user. The Path (A UNC Path like \fileserver\share) may not be writable to the user, who is executing the Setup.exe (It's a Windows-Only Software), so I think How do you check for permissions to write to a directory or file? may not work for me. I know in Java7 there will be a new Filesystem-API, but Java7 is not released yet. EDIT: User 1 - runs the installer User 2 - runs the installed

Control Access to Filesystem with PHP

放肆的年华 提交于 2019-12-08 01:20:05
问题 I previously posted here: Controlling Access for Trial Subscription Since this is a new question based on suggestions there, I thought I should start a new post. If this should have been an edit, please let me know for the future. I think the solution I'm going with to control access will be to upload a file and hash the name. The file will be in the format: /uploads/#############.pdf A link will be sent to subscribers. The first time they come to the site, they'll be asked to create a "pin"

How to determine if you can write to a file with SFTP because of your group?

感情迁移 提交于 2019-12-08 00:31:30
You could do mode & 00002 to see if a file is writable by the public and you could get a directory listing and see if the owner of the file matches the user that you logged in with (although stat doesn't usually return the longname for SFTPv3 servers, which is what you'd need to get the username from that) but what about group permissions? I guess you could create a file on the filesystem, see what it's group is, and see if that group matches the group of the file in question. But what if the group of the file in question is a secondary group that you're a member of? At that point you wouldn't

SELinux Enforcing not honouring httpd_enable_homedirs -> off

…衆ロ難τιáo~ 提交于 2019-12-07 23:43:26
Why am I able to access http://localhost/~myusername in Fedora20 with SELinux set to Enforcing , if the httpd_enable_homedirs boolean is set to off ? The following is a direct excerpt from the fedoraproject's wiki on SELinux about the httpd_enable_homedirs boolean: httpd by default is not allowed to access users home directories. If you want to allow access to users home directories you need to set the httpd_enable_homedirs boolean and change the context of the files that you want people to access off the home dir. I have a directory within the /home/user/ directory that I had set up in a