permissions

Changing permissions via chmod at runtime errors with “Operation not permitted”

元气小坏坏 提交于 2019-12-21 03:41:12
问题 When I use chmod() to change permissions at run time, it gives me the below message: Warning: chmod() [function.chmod]: Operation not permitted in /home/loud/public_html/readalbum.php How can I remove this error and make the chmod function work? 回答1: $ sudo chmod ... You need to either be the owner of the file or be the superuser, i.e., user root . If you own the directory but not the file, you can copy the file, rm the original, then mv it back, and then you will be able to chown it. The

What kind of Android application will require android.permission.READ_PHONE_STATE permission?

霸气de小男生 提交于 2019-12-21 03:13:23
问题 I have seen some Android apps on my phone require this android.permission.READ_PHONE_STATE permission. I don't know if I could trust them. I know this permission will give the app access to many information. I'm particularly interested in what functionality in an Android app normally require the information like DeviceId , SimSerialNumber , SubscriberId ? 回答1: Phone state provides access to a lot of information about the phone. Usual usages will be for reading the IMEI of your phone and your

Removing Custom Permissions/Actions from a Portlet

独自空忆成欢 提交于 2019-12-21 02:49:09
问题 I have been able to define custom portlet actions/permissions based on this example in Liferay Plugins SDK https://github.com/liferay/liferay-plugins/tree/master/portlets/sample-permissions-portlet I want to know the necessary steps I need to take to remove the custom portlet actions/permissions (not model permissions) from a portlet. I remember observing that when I re-deploy a portlet with modified custom actions/permissions, the old custom actions/permissions stick around. I tried deleting

How do we implement permissions in ASP.NET identity?

回眸只為那壹抹淺笑 提交于 2019-12-21 02:26:13
问题 We understand how to implement authentication and authorization in ASP.NET identity with the WebApi. For instance, we can log a user in and then retrieve both his secure token and role. We now want to add permissions. For instance, user steve may be in the admin role. Now we want to assign read, edit, and delete permissions to the admin role. How do we do that in ASP.NET Identity? Is there existing permissions infrastructure in ASP.NET Identity? 回答1: I extended ASP.NET Identity to allow for

Writing a CherryPy Decorator for Authorization

为君一笑 提交于 2019-12-21 01:18:11
问题 I have a cherrypy application and on some of the views I want to start only allowing certain users to view them, and sending anyone else to an authorization required page. Is there a way I can do this with a custom decorator? I think that would be the most elegant option. Here's a basic example of what I want to do: class MyApp: @authorization_required def view_page1(self,appID): ... do some stuff ... return html def authorization_required(func): #what do I put here? Also can the

Using pscp and getting permission denied

别等时光非礼了梦想. 提交于 2019-12-20 17:26:52
问题 I'm using pscp to transfer files to a virtual ubuntu server using this command: pscp test.php user@server:/var/www/test.php and I get the error permission denied. If I try to transfer to the folder /home/user/ I have no problems. I guess this has to do with that the user I'm using doesn't have access to the folder /var/www/. When I use SSH I have to use sudo to get access to the /var/www/ path - and I do. Is it possible to specify that pscp should "sudo" transfers to the server so I can get

403 forbidden: permission to access images

亡梦爱人 提交于 2019-12-20 16:32:14
问题 I'm currently building a new version of a site in Wordpress and trying to add a few images as normal to be referenced both by CSS & HTML. Weirdly it's allowed me to add several images like the logo etc yet when I try to add a few more images it's giving the forbidden message below. The image doesn't appear either and the forbidden message below shows when I goto the path of the image. Forbidden You don't have permission to access /v2/wp-content/themes/default/images/contact-yellow-icon.png on

Django / file uploads permissions

怎甘沉沦 提交于 2019-12-20 16:18:12
问题 I wrote a django app, but I have a little problem with the file permissions of the uploads files from a web form. Basically I can upload a .mp3 file but it always keep chmod 600. The container folder has chmod 775, and the umask is set to 022. I'm in a shared hosting service. 回答1: Try this in your settings.py if you use Python 2: FILE_UPLOAD_PERMISSIONS = 0644 In Python 3 octal numbers must start with 0o so the line would be: FILE_UPLOAD_PERMISSIONS = 0o644 For more details see the

Installshield Folder Permissions not working

最后都变了- 提交于 2019-12-20 15:26:34
问题 Using InstallShield 2012 Professional to install a ASP.NET website, and a custom app pool running in securitry context of a network service account. When I test the website, I encounter a permissions issue (file permissions), and the website fails with the message "Error: Access is Denied.". Using InstallShield, I set permissions to each file for read access to the user "Authenticated Users". I set the permissions within the InstallShield ISM file by navigating to "Application Data" -> "Files

Where does Windows store ACLs and do ACLs follow a file from one machine to another?

拜拜、爱过 提交于 2019-12-20 15:08:09
问题 Our app uses a component that requires a license file in the directory with our executable, which happens to be a .NET WinForms app though I think it is immaterial to this question. When installed on some XP Pro machines (just three out of several hundred thus far), the component throws a license exception. So I regenerated the license file and sent it to the component vendor (EMC Captiva), where the vendor claims the error is due to the fact that the "Users" group has no read permissions on