permissions

In Java what exactly does File.canExecute() do?

大城市里の小女人 提交于 2019-12-19 09:28:13
问题 I have created a plain file which does not have execute permission but when I create a Java File object using this file's path/name and then call File.canExecute() I get true as the result, whereas I would expect this method call to return false. Can someone explain what I'm missing here? Solaris: $ touch /tmp/nonexecutable $ ls -l /tmp/nonexecutable -rw-r--r-- 1 root root 0 May 21 07:48 /tmp/nonexecutable Java: String pathName = "/tmp/nonexecutable"; File myFile = new File(pathName); if (

powershell remove all permissions on a folder for a specific user

情到浓时终转凉″ 提交于 2019-12-19 09:19:42
问题 I need a script or simple powershell code for removing all permissions to a folder for specific user, by inheriting these deletion to all the subfolders and files as well - recursively... Thank you in advance! 回答1: $acl=get-acl c:\temp $accessrule = New-Object system.security.AccessControl.FileSystemAccessRule("domain\user","Read",,,"Allow") $acl.RemoveAccessRuleAll($accessrule) Set-Acl -Path "c:\temp" -AclObject $acl this should wipe all security rules for user in c:\temp recursively 回答2: i

How do I figure out what user & group Apache is running as?

早过忘川 提交于 2019-12-19 07:50:59
问题 On DreamHost shared hosting, I'm setting up htpasswd, but Apache does not have permission to read the file. How do I give it permission? I want to either change the owner or group of the .htpasswd file instead of giving it insecure permissions. I don't think I have access to the httpd.conf file, so I can't use this method to find what user Apache runs as. Also, running top or ps aux only shows the processes I'm running but doesn't show the apache process. Based on the output from cat /etc

How do I figure out what user & group Apache is running as?

纵饮孤独 提交于 2019-12-19 07:50:03
问题 On DreamHost shared hosting, I'm setting up htpasswd, but Apache does not have permission to read the file. How do I give it permission? I want to either change the owner or group of the .htpasswd file instead of giving it insecure permissions. I don't think I have access to the httpd.conf file, so I can't use this method to find what user Apache runs as. Also, running top or ps aux only shows the processes I'm running but doesn't show the apache process. Based on the output from cat /etc

Django/mod_wsgi OSError: [Errno 13] Permission denied: 'static' when DEBUG = OFF

℡╲_俬逩灬. 提交于 2019-12-19 06:58:11
问题 I have a Django 1.4 application on a Centos 6.2 server (running apache, mysql, php) using mod_wsgi with my project deployed in a virtual env. The application itself is one I've been using for several years on a hosted service and I am now deploying on my own rackspace cloud server. The exact version of the app is running fine elsewhere, so this issue is about how I have deployed it. It's my first python/django deployment - I have set up dozens of LAMP sites previously, so it's my lack of

objective-c NSFilePosixPermissions to human readable NSString

匆匆过客 提交于 2019-12-19 06:56:08
问题 is there a way to get human readable string (@"drwxr-xr-x" for example) from an NSFilePosixPermissions integer ? 回答1: The file system permissions attribute is simply an unsigned long value. The code below could obviously be made more efficient but it shows [more or less] what needs to be done to get the string you want: // The indices of the items in the permsArray correspond to the POSIX // permissions. Essentially each bit of the POSIX permissions represents // a read, write, or execute bit

How to detect user giving microphone permission on iOS?

╄→гoц情女王★ 提交于 2019-12-19 06:50:08
问题 So the thing is that I need to call some function after user gives (or declines) a permission to use the microphone. I already saw this: [[AVAudioSession sharedInstance] requestRecordPermission:^(BOOL granted) { if (granted) { // Microphone enabled code [self someFunction]; } else { // Microphone disabled code } }]; However, this works only to detect current state. If the current state is "no" and popup shows and user gives the permission - the function will not be called. That's because in

WRITE_EXTERNAL_STORAGE not working on lollipop even though it's set in the manifest

核能气质少年 提交于 2019-12-19 05:52:44
问题 I'm trying to save images from the apps local data folders to external storage. My manifest contains the following (before the manifest's application tags): <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18"/> When I try the following try { InputStream in = new FileInputStream(filePath); File outPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY

Duplicate GetAccessRules, FileSystemAccessRule entries

╄→尐↘猪︶ㄣ 提交于 2019-12-19 05:52:22
问题 I'm getting a duplicate FileSystemAccessRule from this code below: C:\inetpub\wwwroot\AspInfo\Account BUILTIN\IIS_IUSRS : Allow : ReadAndExecute, Synchronize BUILTIN\IIS_IUSRS : Allow : -1610612736 NT SERVICE\TrustedInstaller : Allow : FullControl NT SERVICE\TrustedInstaller : Allow : 268435456 and I can't work out what or why it is. And the permissions being shown don't match what I can see file FileManager properties. For example, how do I find the "List Folder Contents" permission from

Could not load file or assembly 'Microsoft.CSharp' when logged in with user which is not a member of administrator group

China☆狼群 提交于 2019-12-19 05:13:17
问题 I have created a website which compiles successfully when I log-in using administrator but when I log-in using any other user, following error occurs. Could not load file or assembly 'Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542) The administrator user is member of Acronis Remote Users