0

I have an app that saves xls and pdf files to a drive. We need this drive to be non-accessible by users here because we don't want anyone adding files or deleting files from this drive by hand.

We're considering leaving the drive unmapped on users' machines. If we do this, will I need to use the UNC path when saving files out of my .Net app since the drive isn't mapped on users' machines?

Eric J
  • 227
  • 5
  • 16
  • Do you mean it's mapped on your machine / account and not on the other users'? If so then no, you can save it via a mapped drive if you want to. However, you also need to consider the other users accessing it via a UNC path too. – peterG Sep 12 '13 at 19:25
  • It's mapped on my machine, but no one else's. However, I will not be using this app. The users will be utilizing it, and these users do not have the drive mapped on their machines. It sounds like I will need to use a UNC path so the users can save to this unmapped drive. Do you agree? – Eric J Sep 12 '13 at 19:43
  • The users' accounts will need to have permissions in that folder, so that the app can write to it. However, it that case, they will also be able to navigate to it in Windows Explorer. If you want to have the app write to it without the users being able to access it at all, then your app needs to have its own account, separate from the user's own account. – peterG Sep 12 '13 at 19:51
  • Users will have write permissions to the folder, but we cannot allow them to navigate to it via Explorer, which is why we want to leave the drive unmapped on their machines. I'm just looking for confirmation as to whether or not I need to use a UNC path to allow users to save to a drive that is not mapped on their machine. Thanks for your input. – Eric J Sep 12 '13 at 19:55
  • If the drive is not mapped then yes, you need to access it via a UNC path. However, simply not mapping it will not stop them accessing it. By default, the app will run under their credentials; therefore anything the app can do, they can also do and vice versa. – peterG Sep 12 '13 at 19:58
  • That's cool, as long as users cannot physically see the X drive but the app can save to it, I'm good. Thanks for your comments. If you want to post an answer I'll accept it. Thanks again – Eric J Sep 12 '13 at 20:01
  • there you go then - thanks. I've tried to wrap your answer and my caveat in a nutshell – peterG Sep 12 '13 at 20:07

1 Answers1

2

If the drive is not mapped then yes, you need to access it via a UNC path. However, you should bear in mind that simply not mapping it will not completely stop them accessing it. By default, the app will run under their credentials; therefore anything the app can do, they can also do and vice versa. Even so, if it's not mapped, it will not be immediately visible and this may be sufficient.

peterG
  • 1,651
  • 3
  • 14
  • 23