permissions

Run R in php under ubuntu

南笙酒味 提交于 2019-12-22 10:17:04
问题 I have an R script that runs just fine when I run it from the command line and saves an image to the file system. However when I run it from the php script using the following command : exec("cat my_rscript.R | /usr/bin/R --vanilla"); It doesn't run. Note that when I'm running it in the command line I'm using the exact same call. I'm pretty sure that I'm in the right directory (the php file and the R script are in the same directory). What could be the cause me not being able to run the R

PHP can't read files containing PHP code as text files

大城市里の小女人 提交于 2019-12-22 09:49:00
问题 I've stumbled upon the following pecularity: $handle = fopen(realpath("../folder/files.php"), "r"); can't read a file, but as soon as I remove php tags from the file, it becomes readable and my scripts prints non-empty file content on the page. Also, file.php is never ever executed, so I wonder why it is the problem. I guess somehow Apache or PHP doesn't let read files containing php tags PHP as just text. How can I enable it for my particular file (course doing it globally would be unsecure)

Some phones need permission READ_CONTACTS to read from contact picker

偶尔善良 提交于 2019-12-22 09:25:05
问题 I have a HTC ONE M7 (GPE 4.2.2) and HTC EVO 3D (4.0.3) HTC Sense 3.6 HTC ONE does not need: <uses-permission android:name="android.permission.READ_CONTACTS" /> on HTC EVO 3D however, following code throws an exception: public static String getPhoneNumberFromIntent(Context context, Intent data) throws SecurityException { String contactNumber = null; final Uri contactUri = data.getData(); if (contactUri != null) { Cursor c = null; try { // Read contact number from contacts provider String[]

Where to place resource-action-mapping in Liferay-Portlet?

陌路散爱 提交于 2019-12-22 08:26:14
问题 I am trying to add permissions to a Liferay-Portlet based on the documentation of Liferay. Since the Portlet will be delivered in a war-package, I want to mantain the permission definition of the portlets inside the portlet itself. I created a file resource-actions.xml with the following content (portlet-name is identical to the name specified in portlet.xml and liferay-*.xml): <?xml version="1.0"?> <resource-action-mapping> <portlet-resource> <portlet-name>test-portlet</portlet-name>

Code is ignoring PrincipalPermission attribute?

ぃ、小莉子 提交于 2019-12-22 08:23:23
问题 I have a Delete method on all my business objects that has the PrincipalPermission attribute on it. Example: [PrincipalPermission(SecurityAction.Demand, Role = "Vendor Manager")] public static bool Delete(Vendor myVendor) { //do work here } The problem is that it appears to be completely ignoring my PrincipalPermission. It lets anyone through, no matter what role they may be part of. Is there something else I've forgotten to do? I have added the following to my Application's global.asax in

SQL CLR Stored Procedure and Web Service

假如想象 提交于 2019-12-22 08:20:18
问题 I am current working on a task in which I am needing to call a method in a web service from a CLR stored procedure. A bit of background: Basically, I have a task that requires ALOT of crunching. If done strictly in SQL, it takes somewhere around 30-45 mins to process. If I pull the same process into code, I can get it complete in seconds due to being able to optimize the processing so much more efficiently. The only problem is that I have to have this process set as an automated task in SQL

Permission Denial , even after adding the correct permission in the manifest

无人久伴 提交于 2019-12-22 08:08:16
问题 I am developing an app which listens to incoming sms. I have added the permission: <uses-permission android:name="android.permission.RECEIVE_SMS" /> to my app manifest. And yes, it is not inside the receiver tag. I am trying to test the app by sending a sms from one emulator to another. My logcat gets the following entry : WARN/ActivityManager(66): Permission Denial: receiving Intent { act=android.provider.Telephony.SMS_RECEIVED (has extras) } to com.android.LUC requires android.permission

Enabled “show on lock screen” permission by default on xiaomi mi phone

喜欢而已 提交于 2019-12-22 07:01:05
问题 How can I enable "show on lock screen" permission by default on xiaomi phones. Is it possible by programmatically or add custom permission in manifest or still somehow? 来源: https://stackoverflow.com/questions/52781910/enabled-show-on-lock-screen-permission-by-default-on-xiaomi-mi-phone

Why does the SQLite 3 command using the Android ADB shell return “permission denied”?

寵の児 提交于 2019-12-22 06:57:24
问题 Specifically, I was trying to use the sqlite3 command with the ADB shell to run some queries on the database of the Android application I'm building. I kept getting "sqlite3: permission denied". I'm developing on a Nexus One that I purchased from Google. Does my phone need to be rooted or something? $ sqlite3 /data/data/com.moodme.android/databases/moodme.db sqlite3 /data/data/com.moodme.android/databases/moodme.db sqlite3: permission denied 回答1: The files are read protected. You need to root

My sudo command not working [closed]

▼魔方 西西 提交于 2019-12-22 06:37:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I have a mac 10.8.2 mountain lion and when i try to use the sudo command i get this: sudo: /private/etc/sudoers is owned by uid 501, should be 0 sudo: no valid sudoers sources found, quitting I have searched google all over and tried a couple of things but one thing kinda fixed my orignal perm problem with 0440