permissions

How to give my C# app administrative rights? manifest file

Hi. I'm having some trouble with my C# app that uses win32_networkingadapterconfig. The problem is that I can't use the altering functions in win32_networkingadapterconfig when I use the app on a user that dont have admin rights. I have tried to "run as administrator", but no luck. And I have tried to make a manifestfile with this conte...

direct GET works. image load does not

Ok, this is funny. I just installed a wordpress, and the images are not appearing. Firebug tells me I get a 403 forbidden error for all the images. However, if I copy and paste the url into the address bar, I get the image without any problem. I don't get it (which is ok, considering it's almost 3 in the night) ...

Showing/Hiding Links in an ASP.Net MVC View

I'm trying to figure out how to show/hide links for users based on their roles. I know how to set the authorize attribute for an action method, but I'm having trouble making links show hide in a view if the user is say, an admin or a manager in my roles database. Any good articles or code example someone can point me towards? ...

Get domain groups for a specified user and permissions for a specified file using .Net

I want to return a list of group memberships for a specific domain user. Something like... string[] UserGroups(string domain, string domainUserName) { // query domain info // return a list of accounts the user is a member of } Also, I want to be able to see which domain accounts/groups have access to a specified file/folder. ...

Sitemap webpart based on user permissions using object model

Hi All, I have requirement to create a custom sitemap webpart. The webpart should have a misc field in the edit pane where we could set the number of tiers or levels of childnodes. Here the sites in the sitemap should be displayed based on the permissions of the user who have logged in. Your help would be highly appreciated. ...

python permission error

I have a file a.txt in Mac OS, which has write perms to everybody: sh-3.2# ls -hal a.txt -rw-rw-rw- 1 root wheel 0B Dec 8 11:34 a.txt sh-3.2# pwd /var/root however in python it gives me an error: >>> fob=open("/var/root/a.txt","w") Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> fob=open("/va...

Check for C# app needed permissions

Is there any util or any other way to check what permissions a C# application needs to run without problems? I have a somewhat big application code that i'm not familiar with and i thought if there's a way to check it without going through all the code and logic it will save me a lot of time.. Thanks. ...

MSBuild Extension Pack: Credentials for File/Folder tasks?

Good afternoon, say is it possible to provide credentials (username/pw) for file or folder activities (e.g. removecontent) with the MSBuild Extension Pack? As in.. the build user is not necessary the one I want to use to deleted/work with on certain folders/files I need to modify/delete (e.g. remotely on UNC shares). Is this doable? I ...

Sharepoint Profile Picture access rights

After setting user profile pictures (and user information pictures) for all our sharepoint users (images are kept in a list in one of the site collections), we configured user profiles so that users can update their picture at any moment. The problem is, when the user uploads a picture, it is automatically placed in their Shared Picture...

asp.net run program with Administrator account

Hello, I need to run one console application from ASP.NET application using Administrator account and with Desktop interaction enabled. I have tried code below, console app runs ok but within NETWORK SERVICE account. Any ideas how to run console under Administrator account? string enginePath = Server.MapPath(@"~/engine/MyConsole.ex...

File permissions resetting when switching branches in Git

I created a Git repository on a folder that had a different Linux owner than my user. It wasn't until much later that I set the group permissions to write so that my user could make changes and commits to Git. However, whenever I switch from a branch to master, all the group write permissions are lost. I've tried switching to the master...

security problem with Java ScriptEngine

I just started to use the Java ScriptEngine to do little extensions to my Application then i noticed that i can import all the java classes in the script and use them without restrictions. Is there a way to specify what classes a script can use? I dont want them to do things like java.lang.System.exit(1); ...

Is there a better way to assign permissions to temporary tables in MySQL?

Our users log into the production database as a fairly low-level user, with SELECT granted at the database level, and INSERT/UPDATE/DELETE granted on the specific tables they need access to. They also have permissions to create temporary tables (we need them for some of the more complicated queries). The problem is that whilst they can ...

What is a good way to test whether a file has required permissions?

I see that ifstream::open() returns void and does not offer any way to see if the file did not open due to permissions. What is a good api to test whether read permission or alternatively write permissions are available on a file for the current process in C++? ...

Inherit Active Directory permissions via C#

Edit: It seems it doesn't work. Some permissions aren't copied over it seems. This is inside an Active Directory for Exchange 2010. In the screenshot, there's the user "RTCUniversalUserReadOnlyGroup", with the "permission" column empty. Those permissions don't get copied over at all. Any tips? I'm currently having to uncheck the "Includ...

Launching mysql server: same permissions for root and for user

Hi folks, so far in my 10+ years experience with linux, all the permission problems I've ever encountered, have been successfully solved with chmod -R 777 /path/where/the/problem/has/occured (every lie has a grain of truth in it :) This time the trick doesn't work, so I'm turning to you for help. I'm compiling mysql server from scratc...

strategy to filter data according to user access level

we currently have a very simple security schema... we have resources, that roughly maps to tables, we have access to that resources (add, modify, delete, query) and we have groups. each permission consists of a resource, with a specified access and a group and each user can belong to many groups... so, permission is a many-to-many be...

Getting Event Injector Permission

Hi all, I am trying to get permission for EventInjector . I want to capture Image from the camera and display that image in my application , and for this i need to have EventInjector Permission. My code to get Permission is like: try{ final ApplicationPermissionsManager appPermissionsManager = ApplicationPermissionsManager.getIns...

Best and Proper Permissions Settings for Directory

I am interested in knowing the proper, yet security-conscious settings for a directory. Here's my scenario: I have a username for FTP access to my server called "user". For the purpose of the scenario, PHP runs as "nobody" on my server. I have a directory off the document root called "sample". The "sample" directory is chmod'd at 0755 ...

servicecontroller permissions

I have written a service which a website can execute a command on remotely using the ExecuteCommand method. I have noticed that if the website is not running under a user that is an admin on the remote machine then I get a permission denied exception on trying to execute command. The servicecontroller class doesn't even allow you to sp...