Results 1 to 6 of 6
  1. #1
    swas is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Apr 2017
    Posts
    32

    Back end file changes permissions and ownership

    Hello,

    Firstly - I'm not sure if this is an Access or Windows question so I apologise if not correct for here.

    We use a reasonably large Access 2013 db, spit into front and back ends. Only a small business, typically only 2 users. Front ends are .accdr.

    One PC is used as the file server, where the back end resides in a public share folder. A local user on this PC uses our db from a front end installed on that PC as well. This 'server' pc only has Access Runtime installed.

    From my PC where I have admin privileges, I can see the shared folder no problem - and our back end data file. Perfect world, all works fine. I have full A2013 installed but still only use .accdr front end (May do some programming but always use the .accdr to go 'live').

    But if the local user on the file server PC logs in, opens his front end, then closes, permissions are changed on the back end db file. Note if I am already in the db from my PC this doesn't happen - only if the local fileserver pc opens their front end and no one else is using the db.

    Specifically, back end ownership is changed to them (Not sure if it matters), and security permissions are changed to remove me as a user, hence I can't see the shared file any more. Note I am still a member of the file server admins - it's me as \\fileserver\myname that gets deleted. I have same admin credentials on both pc's.

    So what happens if ONLY the local fileserver pc front end is opened, is next time I try and log in from my pc I get errors saying no back end available. Look at it from MyComputer and sure enough, no back end file (other files are there). The only fix I have is to log into the file server PC (Directly / remotely), edit properties / sharing to re-add me in permissions on the back end file, then all is fine. Perfect world again - until next time...

    We have used the system for many years. Recently we updated our computers going from Windows Server / domain back to just a workgroup (Completely new - pc's, Windows installs etc... so no legacy Server issues).

    As part of the upgrade we went from A2007 to A2013 (Not without some fun...) but all seems stable, at least from a vba perspective. In another (Autonomous) office we still run the A2007 version in a similar workgroup format - no issues. So I'm suspicious of something in A2013...

    No matter what I try I can't resolve the issue. Not a huge drama while it only effects my PC, but will cause hassles if others need to use the system. Searching Google etc... only returns general security / sharing posts which every one has been tried.


    Any advice appreciated. I don't know if it is Access changing permissions / sharing, or something in Windows. Access I am a reasonably comfortable programmer, Windows knowledge not so much.




    Thanks in advance

    swas

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    It does sound more like windows issue rather than access and not sure I have a solution for you but just to check - you say you are running .accdr - does the 'server' machine have a full version of access or just the runtime version? If it is the full version, might be worth checking how access is configured - it might just be something to do with the default open mode - which needs to be shared.

    Other random thoughts - trusted files/locations? Some code run at startup which changes permissions in some way?

    Suggest do a test. Reboot both machines, on your machine, navigate to the directory and see the back end file and set a watch if you can on user permissions. Watch what happens when the server app is opened. If in exclusive mode, then the locking file will not appear. And/or does the backend disappear (you may need to refresh the directory view)? Then watch what happens when the server app is closed. Might at least tie things down as to whether it is a opening or closing event causing the problem.

  3. #3
    swas is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Apr 2017
    Posts
    32
    Thanks for the thoughts Ajax.

    The 'server' is only Access Runtime.

    I've been looking through some code as to what may be creating issues. I have some code on our main switchboard close event that does some tidy up work. Part of this is attempt to take the back end file exclusively, and if so do a DBEngine.CompactDatabase.

    This process requires the back end file to be copied into another file, in it's newly compacted state, and once confirmed successful my code then overwrites the original data file.

    I think this is where the problem is created - permissions / ownership status is being inherited by the user whose Access front end is doing this work. The scenario is correct also - it would only happen if the 'server' local user were the only one logged in.

    This logic seems correct as to the cause, though still not sure of the best way to solve.

    I could adjust Windows settings (As mentioned above not so confident on which settings), but this would then be a PC specific solution which is a little tacky. I would much prefer to have my code handle the situation correctly, and recreate the data file after the compact / repair with the same security settings on the data file.

    Any comment to this logic is appreciated, including suggested best practice solution in implementing. Should I attempt to copy data file permissions before the compact, then reset on completion?


    Thanks again.

    swas

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    Sorry I don't have any idea's how to fix the problem - but your logic and solution seems sound. Not sure why you compact, then copy the file to another location and then copy back - unless I'm reading that wrong?

  5. #5
    swas is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Apr 2017
    Posts
    32
    Ajax,

    Thanks for the note.

    That's how DBEngine.CompactDatabase works - it compacts into a new file so you then have to replace the existing one.


    swas

  6. #6
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    ah yeah! forgot that!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access back end file
    By CHEECO in forum Access
    Replies: 3
    Last Post: 08-02-2016, 03:26 PM
  2. Turning a EXE File Back into ACCDB
    By DWTF in forum Access
    Replies: 7
    Last Post: 01-10-2016, 11:43 AM
  3. File Permissions removed after compact and repair
    By notableaudio in forum Access
    Replies: 3
    Last Post: 12-30-2015, 10:56 AM
  4. Replies: 2
    Last Post: 05-01-2014, 01:31 PM
  5. Moving a back-end file
    By Ted C in forum Security
    Replies: 1
    Last Post: 08-06-2010, 12:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums