shell - Python file write permissions differ from user windows 7 -


i trying copy file across our local network shared folder using python script keep running permissions issue. i've tried shutil, os.system , subprocess.popen similar results. both box , server running windows 7.

in cmd prompt, can

copy a.file \\server\destination.file 

however, same command prompt run

python movefile.py 

which has following code

import os,subprocess,string  file = "a.file" destination = "\\\\server\\destination.file" command = "copy " + file " " + destination if os.path.exists(destination):    print("destination access:" + str(os.access(destination,os.w_ok)))    subprocess.popen(command,shell=true) 

the output

"destination access: false" " access denied.     0 file(s) copied." 

this leads me believe python script has different permissions user. know how around this?

thanks in advance

have checked permissions of python executable? located in c:\python27\ or something. on box, regular users have read , execute permissions, should enough. i'm running admin, full control. try adjusting that.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -