Link to home
Start Free TrialLog in
Avatar of Swadhin Ray
Swadhin RayFlag for United States of America

asked on

python script to copy files

Hello Experts,

I am looking for some solution for pulling the files from a shared network location to my linux server directory.

I only have the network shared drive path like :

\\MFILE054\storage

Open in new window


I am able to map this from my windows machine but then again I need to put the files to my linux server.

I cannot use FTP due to security reason , the only option is to use a direct connection to shared drive from linux.

I am looking for one script which will pull the files from the "storage' folder to my linux path i.e. like" /usr/temp"
ASKER CERTIFIED SOLUTION
Avatar of amitnepal
amitnepal
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Swadhin Ray

ASKER

@amitin  : is it possible to do with sudo access ?
using sudo access I am not able to do it.
It depends on what commands you are allowed to run using sudo. Can you switch to root by typing :

sudo su root

or

sudo su -

If you do not have root access or ability to switch to root, mount command might not have been allowed for you.
I will check this and will update if I still face any issue.

till then let this question be in open stage.

Thanks,
Sloba
Hi amitnepal,

The mount option is not possible ... only direct connection to the shared server and pulling the files to linux machine is the only option for me.

Is there a way where we can do this...?
What do you mean with 'direct connetion to the shared server'?

telnet?
ssh?
ftp? (I think you said no)
vnc?
remote desktop?
http?

Or none of above and you'd like to implement your own client / server processoes on both sides?

How important is security?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree with amitnepal's suggestion.

It's probably more robust and safr than any slf made solution.

cygwin is rather huge though and installing ssh is a little (just a little) trick,
with cygwin you can do custom installation and select ssh only. Also it will be useful if you need other features like rsync in the future. But if you prefer going light footprint  , you can install just ssh .

Thanks
Amit
I will check all the options and will update this question.

Thanks,
Sloba
Thanks