473,498 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

An NT Security Gotcha that looks like a Jet Security issue

I am posting this to the newsgroup because I wasted some time on
Friday troubleshooting a problem of my own making. Other people
might benefit from hearing about it.

I'm working on the final touches to an app that's going to be run by
3 people in an office from their workstations, and about 10 other
people remotely via Windows Terminal Server. The TS is set up and
operating beautifully (I'm not the client's sysadmin, but I
*trained* the guy who is, so I've been given full administrative
control).

I had done all my testing via the Terminal Server and had forgotten
that I couldn't use the TS's local drive letters (LAN users do have
a drive mapped to the TS, but it's not the same as the drive letter
when run locally). So, when this was pointed out to me, I slapped my
forehead and changed to UNC paths.

In all my testing, everything worked fine.

When the client tester tried it, the app was read-only. Well, it
turns out that we'd replaced the testing back end with the real back
end and loaded some archived data, and it looked like the security
was not set up right. Also, I'd added some back-end link checking,
as there actually 3 distinct versions of the front end that need to
be linked to three different back ends (a testing version, a
training version and the production version, linked (respectively)
to a testing back end, a training back end and the production back
end), and thought that something was going wrong with the relinking
code when it was run by a user that didn't have full permissions on
the tables.

To make a long story short, it turned out that the problem had
nothing to do with Jet security, but was caused by my using the
wrong UNC path.

The app is physically located on the data drive of the terminal
server, which is D:. There's a top-level DATA folder, which is
shared, and in that folder is the folder for this app, called
ApplicantsDB. That, too, is shared. So, when you browse the Terminal
Server via My Network Places, you see three shares, Data,
ApplicantsDB and Quickbooks (which is another top-level share).

My intention was that all back end links woul use the UNC path
through the ApplicantsDB *share*, as in:

\\TerminalServer\ApplicantsDB

But I mistakenly set them all up as:

\\TerminalServer\Data\ApplicantsDB

That means going through the DATA share. As it turns out, the user
group defined for this Access application has no permissions set at
all on the DATA share (or folder), and has MODIFY permission on the
ApplicantsDB folder and share. The Domain Users group has READ-ONLY
access on the DATA folder and share, so the result was that nobody
but domain adminirators (which included *me*) had write permission
on \\TerminalServer\Data\ApplicantsDB because I was getting to the
ApplicantsDB *folder* via the Data *share*, instead of getting to
the same dsetination through the ApplicantsDB share.

So, if you're ever in a situation where you are getting read-only
access (or none at all) to data on a server, be sure to check that
the permissions are set correctly on it and that you're accessing it
through the right path.

I knew all of this, of course (I was the one who set it up!), and
was just not paying attention.

But I thought I'd post about it because most people who do Access
development don't have the NT adminstration experience that I have,
so might have much more trouble figuring out a problem like this.

It gave *me* enough difficulty, and I'm supposed to *know* what I'm
doing in this area!

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #1
5 1137
I had a couple of long debugging sessions similar to what you're describing on
a project of mine a while back. I'm in the mode now that when it's possible
to repeat a mistake that's hard to diagnose, I try to add some kind of
automation that makes the mistake harder to make.

In my case (though I think it wouldn't have worked for yours), I added
constants to the code for the development, production, and testing back-end
paths. When the code starts up, it checks the links, and if they point to
anything other then the production path, a warning pops up saying the
Development, Testing, or an Unknown back-end path is being used. When running
the re-link operation, I also can pass one of the constant names as the path
argument, so I can't accidentally mis-type it.

Since there are long periods between work sessions with the client in
question, I'm sure without the link checking code, I'd have made the same
mistake again more than once and spent quite a while debugging each time
before saying "doh!"
On Sat, 17 Sep 2005 13:28:31 -0500, "David W. Fenton"
<dX********@bway.net.invalid> wrote:
I am posting this to the newsgroup because I wasted some time on
Friday troubleshooting a problem of my own making. Other people
might benefit from hearing about it.

I'm working on the final touches to an app that's going to be run by
3 people in an office from their workstations, and about 10 other
people remotely via Windows Terminal Server. The TS is set up and
operating beautifully (I'm not the client's sysadmin, but I
*trained* the guy who is, so I've been given full administrative
control).

I had done all my testing via the Terminal Server and had forgotten
that I couldn't use the TS's local drive letters (LAN users do have
a drive mapped to the TS, but it's not the same as the drive letter
when run locally). So, when this was pointed out to me, I slapped my
forehead and changed to UNC paths.

In all my testing, everything worked fine.

When the client tester tried it, the app was read-only. Well, it
turns out that we'd replaced the testing back end with the real back
end and loaded some archived data, and it looked like the security
was not set up right. Also, I'd added some back-end link checking,
as there actually 3 distinct versions of the front end that need to
be linked to three different back ends (a testing version, a
training version and the production version, linked (respectively)
to a testing back end, a training back end and the production back
end), and thought that something was going wrong with the relinking
code when it was run by a user that didn't have full permissions on
the tables.

To make a long story short, it turned out that the problem had
nothing to do with Jet security, but was caused by my using the
wrong UNC path.

The app is physically located on the data drive of the terminal
server, which is D:. There's a top-level DATA folder, which is
shared, and in that folder is the folder for this app, called
ApplicantsDB. That, too, is shared. So, when you browse the Terminal
Server via My Network Places, you see three shares, Data,
ApplicantsDB and Quickbooks (which is another top-level share).

My intention was that all back end links woul use the UNC path
through the ApplicantsDB *share*, as in:

\\TerminalServer\ApplicantsDB

But I mistakenly set them all up as:

\\TerminalServer\Data\ApplicantsDB

That means going through the DATA share. As it turns out, the user
group defined for this Access application has no permissions set at
all on the DATA share (or folder), and has MODIFY permission on the
ApplicantsDB folder and share. The Domain Users group has READ-ONLY
access on the DATA folder and share, so the result was that nobody
but domain adminirators (which included *me*) had write permission
on \\TerminalServer\Data\ApplicantsDB because I was getting to the
ApplicantsDB *folder* via the Data *share*, instead of getting to
the same dsetination through the ApplicantsDB share.

So, if you're ever in a situation where you are getting read-only
access (or none at all) to data on a server, be sure to check that
the permissions are set correctly on it and that you're accessing it
through the right path.

I knew all of this, of course (I was the one who set it up!), and
was just not paying attention.

But I thought I'd post about it because most people who do Access
development don't have the NT adminstration experience that I have,
so might have much more trouble figuring out a problem like this.

It gave *me* enough difficulty, and I'm supposed to *know* what I'm
doing in this area!


Nov 13 '05 #2
Steve Jorgensen <no****@nospam.nospam> wrote in
news:qt********************************@4ax.com:
I had a couple of long debugging sessions similar to what you're
describing on a project of mine a while back. I'm in the mode now
that when it's possible to repeat a mistake that's hard to
diagnose, I try to add some kind of automation that makes the
mistake harder to make.

In my case (though I think it wouldn't have worked for yours), I
added constants to the code for the development, production, and
testing back-end paths. . . .
Well, that's precisely what I'd done, but I'd copied the *wrong*
paths into the constants, because I'd picked them up from
CurrentDB.Name, and I'd opened the database from
\\TerminalServer\Data\ApplicantsDB instead of from
\\TerminalServer\ApplicantsDB!
. . . When the code starts up, it checks the
links, and if they point to anything other then the production
path, a warning pops up saying the Development, Testing, or an
Unknown back-end path is being used. When running the re-link
operation, I also can pass one of the constant names as the path
argument, so I can't accidentally mis-type it.
Well, this was exactly the task that the code I was writing was
performing, and it was because I'd used constants in the code that
it ran into the problem.
Since there are long periods between work sessions with the client
in question, I'm sure without the link checking code, I'd have
made the same mistake again more than once and spent quite a while
debugging each time before saying "doh!"


Well, nothing can protect you or me from putting the wrong values in
the constants!

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #3
On Sun, 18 Sep 2005 16:23:33 -0500, "David W. Fenton"
<dX********@bway.net.invalid> wrote:

....
. . . When the code starts up, it checks the
links, and if they point to anything other then the production
path, a warning pops up saying the Development, Testing, or an
Unknown back-end path is being used. When running the re-link
operation, I also can pass one of the constant names as the path
argument, so I can't accidentally mis-type it.


Well, this was exactly the task that the code I was writing was
performing, and it was because I'd used constants in the code that
it ran into the problem.
Since there are long periods between work sessions with the client
in question, I'm sure without the link checking code, I'd have
made the same mistake again more than once and spent quite a while
debugging each time before saying "doh!"


Well, nothing can protect you or me from putting the wrong values in
the constants!


No - I guess not. In my case, since I'd just been debugging the same kind of
mystery when I implemented the constants as a fix, I think I'd have seen/fixed
the problem with the constants right away. Without that, I could well have
had the same kind of problem you did.
Nov 13 '05 #4
Steve Jorgensen <no****@nospam.nospam> wrote in
news:ra********************************@4ax.com:
On Sun, 18 Sep 2005 16:23:33 -0500, "David W. Fenton"
<dX********@bway.net.invalid> wrote:

...
. . . When the code starts up, it checks the
links, and if they point to anything other then the production
path, a warning pops up saying the Development, Testing, or an
Unknown back-end path is being used. When running the re-link
operation, I also can pass one of the constant names as the path
argument, so I can't accidentally mis-type it.


Well, this was exactly the task that the code I was writing was
performing, and it was because I'd used constants in the code that
it ran into the problem.
Since there are long periods between work sessions with the
client in question, I'm sure without the link checking code, I'd
have made the same mistake again more than once and spent quite
a while debugging each time before saying "doh!"


Well, nothing can protect you or me from putting the wrong values
in the constants!


No - I guess not. In my case, since I'd just been debugging the
same kind of mystery when I implemented the constants as a fix, I
think I'd have seen/fixed the problem with the constants right
away. Without that, I could well have had the same kind of
problem you did.


I still don't understand your point. I was using constants. And I
was checking the back end links. And I was relinking to the values
in the constants.

And those values were the WRONG ONES.

So, setting constants doesn't help unless you are setting the right
constants.

Indeed, the constants didn't *cause* the problem, either. Whatever
method I'd have used for getting the back end names would have been
subject to the same human error.

But the problem was one that I hadn't really encountered before,
because I normally am on the ball with defining my UNC paths.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #5
On Mon, 19 Sep 2005 20:37:31 -0500, "David W. Fenton"
<dX********@bway.net.invalid> wrote:
Steve Jorgensen <no****@nospam.nospam> wrote in
news:ra********************************@4ax.com :
On Sun, 18 Sep 2005 16:23:33 -0500, "David W. Fenton"
<dX********@bway.net.invalid> wrote:

...
. . . When the code starts up, it checks the
links, and if they point to anything other then the production
path, a warning pops up saying the Development, Testing, or an
Unknown back-end path is being used. When running the re-link
operation, I also can pass one of the constant names as the path
argument, so I can't accidentally mis-type it.

Well, this was exactly the task that the code I was writing was
performing, and it was because I'd used constants in the code that
it ran into the problem.

Since there are long periods between work sessions with the
client in question, I'm sure without the link checking code, I'd
have made the same mistake again more than once and spent quite
a while debugging each time before saying "doh!"

Well, nothing can protect you or me from putting the wrong values
in the constants!


No - I guess not. In my case, since I'd just been debugging the
same kind of mystery when I implemented the constants as a fix, I
think I'd have seen/fixed the problem with the constants right
away. Without that, I could well have had the same kind of
problem you did.


I still don't understand your point. I was using constants. And I
was checking the back end links. And I was relinking to the values
in the constants.

And those values were the WRONG ONES.

So, setting constants doesn't help unless you are setting the right
constants.

Indeed, the constants didn't *cause* the problem, either. Whatever
method I'd have used for getting the back end names would have been
subject to the same human error.

But the problem was one that I hadn't really encountered before,
because I normally am on the ball with defining my UNC paths.


I was agreeing with you.

I'm saying the only reason I avoided the same problem is that I was dealing
with similar symptoms right -before- I created the constants and was using the
constants as a fix. If I had just implemented the constants up-front, there
would have been nothing to prevent me having a similar problem to yours.
Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1758
by: Frank Bechmann | last post by:
Eventually most of you will not learn much from this because it's just another event in the 'default argument value gotcha' series, but because it cost me some hours yesterday to spot this 'error'...
28
2760
by: grahamd | last post by:
Who are the appropriate people to report security problems to in respect of a module included with the Python distribution? I don't feel it appropriate to be reporting it on general mailing lists.
3
2321
by: craig | last post by:
I am working on my first .NET development project that involves custom role-based security per the project requirements. This lead to a general design issue this week that really caused us some...
5
2173
by: Greg Strong | last post by:
Hello All, What are the best ways to implement security for Access databases (i.e. ..MDB files)? I ask the question from a general perspective. Why? Well I had written a prototype database...
15
1757
by: Scott W Gifford | last post by:
Hello, We've got a Web-based application written in Perl that is designed to integrate as a frame into many different Web sites. We currently have several stylesheets available to allow the...
15
10475
by: himilecyclist | last post by:
My State government organization has written a PHP/MySQL application which has been in production for about 6 months and has been highly successful. We are now embarking on a similar database...
0
1157
by: Yin99 | last post by:
Do the TableAdapters have any limitations, gotcha's, or anything that may bite ya in the rear down the road? I'm looking for lessons learned and/or past experience. I'm starting a new...
16
2737
by: Hendrik van Rooyen | last post by:
I thought I would share this nasty little gotcha with the group. Consider the following code fragment: <start> print 'starting kbd thread' keyboard_thread = thread.start_new_thread(kbd_driver...
5
1563
by: cnb | last post by:
this recursive definition of sum thrumped me, is this some sort of gotcha or am I just braindead today? and yes i know this is easy a a for x in xs acc += x or just using the builtin. def...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7167
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7208
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5464
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4593
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3095
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
657
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
292
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.