Solved

Permissions Issue

Posted on 2006-07-12
7
224 Views
Last Modified: 2011-09-20
I have a VB.NET service which copies images form a local to a remote directory, when I set both local and remote to the same machine and give the remote folder write permissions to users of that machine everything works fine. However, when I set the remote directory to a mapped drive on our windows 2000 server and make sure the folder has write permissions for everyone it stops working
0
Comment
Question by:rocky050371
  • 4
  • 3
7 Comments
 
LVL 8

Expert Comment

by:Shakti109
ID: 17092288

Are you giving the service a domain level account to use?

Services can run under different accounts (including localsystem). If the service is set to use localsystem (the default) it will not be able to do anything outside of the local machine.

Change the account the service runs under to a Domain level account that has permissions to the servers.
0
 

Author Comment

by:rocky050371
ID: 17092428
If I select in the service log on area and attempt to change it to myself a domain user, the only users that appear in the box are those of this machine.

for example there is Joe Bloggs DEVELOPER

But no Joe Bloggs TECHNICAL which is the domain and what I log on to
0
 
LVL 8

Expert Comment

by:Shakti109
ID: 17092562

This is due to to the security of that user selection box (if you are where I think you are).

You need to actually type it in (in that box):  \\domain\username

I.E : \\Technical\JoeBloggs

The syntax has some variations and depending on where/how you are setting the account the syntax may vary between the following :

domain\username
\\domain\username

0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:rocky050371
ID: 17092677
The service is now running as TECHNICAL\JoeBloggs, I then added myself on to the folder with full control but it still does not work
0
 
LVL 8

Expert Comment

by:Shakti109
ID: 17092781

There are share-level permissions, and folder level permissions.

Just as a check, does that account have share-level permissions (read, write, etc) to the server\share?

Also , are you using a named drive path or a UNC?  

Named path : d:\myfolder\here
UNC : \\RemoteServer\Share\Folder

If you are using a named path, change this to the UNC format and check the share-level permissions to make sure the account you are using has enough rights.
0
 

Author Comment

by:rocky050371
ID: 17093034
I tried it with a UNC and it worked, not sure why the named drive failed?
0
 
LVL 8

Accepted Solution

by:
Shakti109 earned 500 total points
ID: 17093065
When you define a named path (map a drive), an account gets associated with that named path.

If you don't explicitly define it when you map it, it is assumed to be the current user context. In doing this, it has no password associated with it (for obvious security reasons) and instead simply relies on the windows security service to have authenticated the user and have passed back the correct token.

When using a UNC path, there is nothing associated with the map, so it relies on the credentials you supply.

You CAN define a permanent map using a dos command, and associate an account that way, but it is more robust/flexible to simply use UNC paths.

Also, some programming commands break down when trying to use named paths (some WMI methods for example) and will simply "fail" with no good description.

When in doubt, use UNC pats :)
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now