Solved

Permissions Issue

Posted on 2006-07-12
7
226 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

932 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

14 Experts available now in Live!

Get 1:1 Help Now