• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

Permissions Issue

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
rocky050371
Asked:
rocky050371
  • 4
  • 3
1 Solution
 
Shakti109Commented:

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
 
rocky050371Author Commented:
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
 
Shakti109Commented:

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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
rocky050371Author Commented:
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
 
Shakti109Commented:

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
 
rocky050371Author Commented:
I tried it with a UNC and it worked, not sure why the named drive failed?
0
 
Shakti109Commented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now