Python Forum

Full Version: access is denied error 5 for network drive mapping ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I working on script running on sql server 2019 using python 3.10 .

I have directory path \\192.168.7.9\Import\8 as mapped network drive and can
write and read to files and delete and create files on this directory path \\192.168.7.9\Import\8.

my issue when run script python on sql server 2019 it give me error 5 access is denied
but it must return true because directory path exist.

this path have permissions everyone and administrator and system full control read and write and delete .

EXEC sp_execute_external_script
@language =N'Python',
@script=N'
import os
result = os.system("net use S: \\\\192.168.7.9\\Import\\8")
print("result =", result)
d = os.path.isdir("S:")
print("d =", d)'
What happens if you open the Windows File Explorer and type "\\192.168.7.9\Import\8" in the address bar?
Remember you need to give permissons (on the server) both on the share and on the folder (and/or files). (Giving permissions on the top folder will do because permissions propagate down.)
yes i can access this path from file explorer and write on it and read on it and delete from it .
also this server is 7.7 and i need to access server 7.9 from another server so are this way is correct