Thread: Accessing files/directories with different permission

  1. #1
    Registered User
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    80

    Accessing files/directories with different permission

    When my code tries to access the files in a certain folder, a bunch of permission denials are thrown back at me. How can I let the program access the folder using a certain user/permission set?

    Any help is appreciated.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Wouldn't that defeat the whole purpose of having permissions to start with?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    80
    I understand your point, but there should be a way so that I can tell the code to use this user's permission template when trying to access that folder. e.g. using SYSTEM, or using a specific user account.
    Last edited by Opel_Corsa; 01-23-2007 at 04:08 PM.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Use the windows feature which allows you to "run as.." another user.
    Just right-click on the executable.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    80
    Thanks. Hoewer I just managed to fix it in my code.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. vector : accessing values
    By rahulsk1947 in forum C++ Programming
    Replies: 1
    Last Post: 06-01-2009, 09:26 PM
  2. tmpnam() : permission denied when try to open temp file
    By happyclown in forum C Programming
    Replies: 3
    Last Post: 03-16-2009, 11:48 PM
  3. Running remove() gets permission denied error...
    By edomingox in forum C Programming
    Replies: 4
    Last Post: 01-11-2009, 12:55 PM
  4. Accessing HW registers using bit fields and UINT32
    By samdomville in forum C Programming
    Replies: 4
    Last Post: 12-10-2008, 01:00 PM
  5. Problems accessing logged on user via System.Security
    By conor20_ie in forum C# Programming
    Replies: 5
    Last Post: 11-16-2007, 07:52 AM