permissions

Is it possible to create a script to save and restore permissions?

I am using a linux system and need to experiment with some permissions on a set of nested files and directories. I wonder if there is not some way to save the permissions for the files and directories, without saving the files themselves. In other words, I'd like to save the perms, edit some files, tweak some permissions, and then rest...

IIS Virtual Folders Permissions per User Account

I have a website with the below structure for saving product images: ~/fileserver/{user_id}/{file_id}.{file_extension} I want to restrict access to each {user_id} folder and let only the specific user to retrieve that image. How this can be done? Do I have to set something in IIS? ...

Android: Write to /sys/ directory

I'm developing an application that is not intended to be released as a standard app. It'll be run on a single rooted device. I require the ability to write to a file in the /sys/ directory. The file in question is owned by root and has -rw-rw-rw- permissions. I am aware that there may be restrictions on the VM my code runs within that ...

Enable usb debugging (under settings/applications/development) programmatically from within app

Is it possible to enable usb debugging (under settings/applications/development) programatically from within my app? I was looking at Permission.WRITE_SETTINGS and http://developer.android.com/reference/android/provider/Settings.System.html but couldn't find anything appropriate. ...

Facebook Developer Toolkit permissions

I am using the Facebook Developer Toolkit to try and develop a facebook application in VB and having trouble setting permissions so I can write on users walls etc. Could anyone help with this? Thanks Hazel ...

Setting up a user to my database in my SQL Server

Hi All, I just finished creating a new user for my database in SQL Server. I had 4 tables I wanted to grant Insert, Update, Select and delete permissions. I did this manually in the Securables area of the new user. Is there a better way to do this that to have to touch each object? if so, how? Thanks, rod. ...

onBoot Complete as user preference

Hi All, Is there a way that trough the application, I can subscribe and unsubscribe for the "ACTION_BOOT_COMPLETED" message? If so, how can I do this? Any kind of pointer will help me. Thanks in advance, Regards, Vinay ...

Django - multiple databases and auth.Permission

I'm working on a project that needs two databases - one for the "logged out" portion and one for the logged in. I need the auth (and therefore contenttypes) app synched to both databases, which is working fine. However, the management commands for auth and contenttypes that create the default Permission and ContentType objects aren't run...

Common permission for groups in Acl-cakePHP

hello friends, I am using Acl in new web app. in my app there are four groups of users. I have given $this->Auth->authorize = 'actions' so that it will check the permission for actions automatically. my problem is some of the actions such as change Password,edit profile,etc... are common to all users. But now i need to create each rec...

Can an Android Service have multiple Permissions?

I have a service which both downloads a file and saves it, and it seems I can only specify one permission. <service android:enabled="true" android:name=".DownloadService" android:permission="android.permission.INTERNET"> </service> or <service android:enabled="true" android:name=".DownloadService" ...

How should I be writing the HTML etc for security roles in the application I've inherited?

Hello everyone, As the title suggests, I've inherited a php/MySQL application which has fairly well written procedural code, but only has one admin user login. The client naturally wants to split out functionality into different users/roles and ultimately update the application code with best-practice techniques. For the example of upd...

How to manage references to permissions in the code and in the database?

How do people manage permissions between their code base and the database? For example, my application is becoming littered with: if($objects['username']['access_type'] == 'edit'){ // print the HTML to edit the username } or in OO: if($user->getPermission('username')->canEdit()){ // print the HTML to edit the username } How...

How can I specify alternate credentials in code?

I want to run this function, or at least the bit that deletes the machine account from AD with different credentials: public static void DeleteMachineAccount(String MachineName) { String MachineLdapPath = LdapPath(MachineName); String OuLdapPath = MachineLdapPath.Replace("CN=" + MachineName + ",", ""); ...

Why are these permissions being refused?

Just for the Heck of it, I requested all the permissions from my application (hello world), to see what are the types of permissions that are granted and what are those that are refused! To my amusement I found about 40 of the permissions not granted! Two were returned as unknown permissions. Here is the log of all the permissions that ...

Rails - caching and permission based views

Hello, I use CanCan to check user permissions and display or suppress page content conditionally for my users. I want to cache my pages though, and even with fragment caching can't find an elegant solution... for example: cache do # much code if can? # little code else # little code # much code if can? # little cod...

PHP file permission

Ideally I would be using suPHP however I have been forced to use DSO... How worried should I be about setting the folders permissions to 777 and how can I improve the security of doing so? ...

problem with ftp pushing files and me not having access as regular user

Heya, how goes it? I've run visudo and added my username to the list to be able to do whatever I need to rather than logging in as root user. I have my svn push out file's through ftp as user www-data, and therefore when I try to cd into those directories, I get permission denied. Any thoughts? Can I add my username to some config file...

What should be the right file permissions for program executables and logs files?

I have written a Linux system wide C++ program /usr/bin/PROG_X that uses a configuration file /etc/PROG_X.conf and log file /var/PROG_X.log. Now I need to call this program, after strong authentication, from the web using apache web server and php. Calling the program may involve changing configuration files and will change, of course, ...

File permissions; Should my www-folder content be owned by www-data?

This might be a noob question, but can't find an answer anywhere. I have a problem, which http://stackoverflow.com/questions/3483832/another-file-permissions-problem have helped me to ALMOST solve. I have created a user in linux (danny) which has sudo access. I have also created a new group which name ALSO is danny, and added the user ...

How to allow download of file via Apache with Django's permission?

Is there a way for Apache to allow or deny a file download after checking with Django for permission? That is, I want the user to have a permission within Django to determine if the user has the rights to a file. And, if the user has the permission, Apache would start the file download. Or, if the permission is not set for that user, th...