Home All Groups Group Topic Archive Search About

xp_cmdshell and mapped drive

Author
19 Aug 2005 5:57 PM
bluemug
Hi there,

I've seen a lot of discussions around using xp_cmdshell to access a
mapped drive. My problem is a little bit different. I have a local
mapped drive F:. I have no problem accessing the drive from command
shell. When I say "exec master..xp_cmdshell 'dir F:'", I don't get the
"access denied" msg other people get, instead, I got the following:
---------------------------------------
Volume in drive F is VDisk1
Volume Serial Number is 4070-939C
NULL
Directory of F:\
NULL
File Not Found
NULL

(7 row(s) affected)
---------------------------------------
It looks like xp_cmdshell can see the mapped drive, but somehow it
can't see the files on that drive. I do have some files on that file.

Is that something wrong with my NT security set up or something wrong
with DB security set up? I login the server as SA

Thanks a lot.
blue

Author
19 Aug 2005 10:24 PM
GMG
The following article may help:

http://www.mssql.com.au/kb/html/gmgxsl.dll/htmlkb?usexsl=y&sp=psearch_articl
e_text&@sa_id=62


Show quote
"bluemug" <jianyang***@gmail.com> wrote in message
news:1124474248.169409.256030@g49g2000cwa.googlegroups.com...
> Hi there,
>
> I've seen a lot of discussions around using xp_cmdshell to access a
> mapped drive. My problem is a little bit different. I have a local
> mapped drive F:. I have no problem accessing the drive from command
> shell. When I say "exec master..xp_cmdshell 'dir F:'", I don't get the
> "access denied" msg other people get, instead, I got the following:
> ---------------------------------------
>  Volume in drive F is VDisk1
>  Volume Serial Number is 4070-939C
> NULL
>  Directory of F:\
> NULL
> File Not Found
> NULL
>
> (7 row(s) affected)
> ---------------------------------------
> It looks like xp_cmdshell can see the mapped drive, but somehow it
> can't see the files on that drive. I do have some files on that file.
>
> Is that something wrong with my NT security set up or something wrong
> with DB security set up? I login the server as SA
>
> Thanks a lot.
> blue
>

AddThis Social Bookmark Button