none
CompactFlash Permission

    Question

  • I have a weird problem I need help with. I have an app that allows the customer to take pictures on his camera, then put his CompactFlash card, CF, in a reader hooked to the computer. The app copies the images to disk, does some stuff to the images and then deletes the images from the CF where it is ready for the next set of pictures. This has been working for months. The problem now is that last two times the photographer has gone out after like a 100 takes, not the same every time, the images permission get changed to not allow delete. So the program stops and gives an error. What could be causing this problem? Can I check for this with my app and reset the permissions on the folder on the CF card?

    Thanks for the help.

    Thursday, April 6, 2017 4:25 PM

All replies

  • >>> the images permission get changed to not allow delete. So the program stops and gives an error. What could be causing this problem?


    You didn't specify what error you are getting? Also what type of application is this WinForm, WPF, ASP.Net, Windows Phone App? This will help us to give you appropriate solution.

    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Thursday, April 6, 2017 9:18 PM
    Moderator
  • It's a WinForm solution. The error is accesspermission, can't give exact error till tomorrow cause customer didn't give exact error. The last time it occurred, this is the second time, I passed it off as a bizarre incidence and I didn't write it down.

    Not only has this not happened in the past, it works 70-100 times before the problem occurs now.

    • Edited by David32 Thursday, April 6, 2017 10:14 PM
    Thursday, April 6, 2017 10:13 PM
  • I'm sticking with the bizarre incidence. Looking at the error this time showed the camera had changed the directory where it put the pictures. I just directed the customer to change the setting in the software where the pictures were stored.

    Monday, April 10, 2017 2:47 PM
  • It depends what you mean by "permissions". If the CF is secured by NTFS or similar then there are APIs to query for the permissions of a user for a file using the Access Control API.

    If instead the permission is a simple file attribute (eg. read only) then you can get that directory from the file.

    If the permission is being denied because of a share violation then somebody has the file open. It could be your app so you should check for that first.

    The only real way to detect these problems though is to handle the exception that will be thrown when it occurs. You should really be doing this for all file operations.

    Michael Taylor
    http://www.michaeltaylorp3.net

    Monday, April 10, 2017 5:37 PM
    Moderator
  • Hi David32,

    If your issue is solved please Mark as answer or Vote as helpful post to the appropriate answer so that it will help other members to find solution if they faces similar issue.

    Your understanding and cooperation will be grateful.

    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Friday, May 12, 2017 1:06 PM
    Moderator