Solved

Permissions Issue

Posted on 2006-07-12
7
234 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

695 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