Python Forum
access is denied error 5 for network drive mapping ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
access is denied error 5 for network drive mapping ?
#1
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)'
Yoriz write Aug-14-2022, 09:22 AM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply
#2
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.)
Reply
#3
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question How to get a removable disc type in drive Daring_T 12 1,234 Feb-11-2024, 08:55 AM
Last Post: Gribouillis
  open python files in other drive akbarza 1 692 Aug-24-2023, 01:23 PM
Last Post: deanhystad
  Integrating Google Drive in App Lahearle 0 471 Jul-19-2023, 05:51 PM
Last Post: Lahearle
  Mapping a value to an interval JazonKuer 12 1,994 Mar-17-2023, 07:59 PM
Last Post: Gribouillis
  The INSERT permission was denied on the object Steven5055 2 1,485 Feb-25-2023, 11:37 PM
Last Post: Steven5055
  code to send attachments contained on the drive. stefanoste78 1 857 Oct-12-2022, 02:16 AM
Last Post: Larz60+
  Cant Access D: Drive kucingkembar 4 1,343 Jul-28-2022, 04:53 PM
Last Post: kucingkembar
  Server Folder Error : WinError5 Access Denied fioranosnake 1 1,125 Jun-21-2022, 11:11 PM
Last Post: Larz60+
  Calling exe on network drive GrahamL 4 2,547 Jan-21-2022, 12:01 PM
Last Post: GrahamL
  Mapping a range ebolisa 5 3,510 Jun-12-2021, 11:17 PM
Last Post: ebolisa

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020