LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-27-2011, 01:26 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 30
ftp drive


I want to write a script to ftp to windows ( the script will run on linux ) to get data , can advise if the default drive is c: , now I want to change to another drive eg. d: , what can i do ?

Thanks.
 
Old 06-27-2011, 10:11 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,504

Rep: Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992
Quote:
Originally Posted by ust View Post
I want to write a script to ftp to windows ( the script will run on linux ) to get data , can advise if the default drive is c: , now I want to change to another drive eg. d: , what can i do ?
Thanks.
You can modify your script to change to the new drive, that's what you can do. Since you don't post your script, or give any real details, what do you expect anyone to be able to tell you??? Read the man pages for the FTP command.
 
Old 06-27-2011, 10:28 AM   #3
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
What FTP server is running on Windows?
Do you have the other drives added to the FTP server so it will actually let you cd into them?
 
Old 06-28-2011, 09:44 PM   #4
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by TB0ne View Post
You can modify your script to change to the new drive, that's what you can do. Since you don't post your script, or give any real details, what do you expect anyone to be able to tell you??? Read the man pages for the FTP command.
my script is still in development , so I am not prefer to upload it to here.

The requirement is simple , when I login to the windows ftp server , the initial path is c:\Document and setting\.... , now I want to change to another directory eg. d drive , what can I do ?

I have tried d:\ or cd d:\tmp , all is not work .

Thanks.
 
Old 06-29-2011, 11:00 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,504

Rep: Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992
Quote:
Originally Posted by ust View Post
my script is still in development , so I am not prefer to upload it to here.
Then how do you expect anyone to help you with it?
Quote:
The requirement is simple , when I login to the windows ftp server , the initial path is c:\Document and setting\.... , now I want to change to another directory eg. d drive , what can I do ? I have tried d:\ or cd d:\tmp , all is not work .
Again, without your script, we can't help, especially if you don't provide any details. Just saying "all is not work", tells us nothing. From the man pages for FTP, along with thousands of references you can find from Google, both the "cd" and "lcd" commands work just fine for what you're trying to do.

You don't mention if you're using expect or not, how you're getting/putting files, or what you're trying to accomplish.
 
Old 06-29-2011, 03:24 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,868

Rep: Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301
I could be wrong on this but a ftp server would provide access to some folder in windows. You may be allowed to traverse up a bit but usually you can't change drives. Set the ftp on windows to provide default folder on D:\ somewhere instead.
 
1 members found this post helpful.
Old 06-29-2011, 03:54 PM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,504

Rep: Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992
Quote:
Originally Posted by jefro View Post
I could be wrong on this but a ftp server would provide access to some folder in windows. You may be allowed to traverse up a bit but usually you can't change drives. Set the ftp on windows to provide default folder on D:\ somewhere instead.
Hmm...you may be correct there. From some other FTP scripts I've seen, though, you *SHOULD* be able to do a "cd d:\somefolder". However, I didn't consider Windows folder permissions, and how Windows FTP may work. The OP hasn't posted any real details, though.
 
Old 06-30-2011, 03:01 AM   #8
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
You still haven't indicated which ftp server you're using in Windows. Because that is where you must set it up before it even can work. See also post #3 by dudeman41465

I did a quick check on filezilla: http://wiki.filezilla-project.org/FA...lla_Server_FAQ ; search for drive and it explains it.

Note:
To my knowledge, the ftp protocol does not know about drives, only folders.

Last edited by Wim Sturkenboom; 06-30-2011 at 03:03 AM.
 
Old 06-30-2011, 11:17 AM   #9
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,205

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
indeed, as far as i know an ftp server works in the same manner as a web server, you provide it with a folder to use a 'document root' and ftp clients can't usually get any higher up the tree then that and drive letters are irrelevant to ftp clients.
 
1 members found this post helpful.
Old 06-30-2011, 12:24 PM   #10
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,062

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
i think the limitation on windows is that the d:\ root isnt on the same directory tree as c:\ .

so i think it will be impossible to change drives (unless windows has some hack where you can mount the d:\ drive under c:\ or some clever symlinks/ shortcuts).

or you can chroot jail the host's ftp server to look at d:\ instead.

opinion: this is probably why most servers tend to run on linux/ unix because you can have multiple drives mounted in one directory tree (might i also suggest scp since ftp is horribly deprecated and insecure).

Last edited by schneidz; 06-30-2011 at 12:32 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading Hard Drive in FTP Server dzollinger Linux - Hardware 2 03-28-2008 04:29 PM
FTP server and X-drive Fedora 6 Linux - Server 1 02-16-2008 08:18 AM
Mounting an FTP Server Drive jimsproch Linux - General 2 05-12-2006 02:40 AM
Hard drive imaging, and ftp thebored *BSD 12 04-03-2006 04:25 AM
ftp server - hard drive format rndilger Linux - Networking 1 02-13-2005 01:27 PM


All times are GMT -5. The time now is 08:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration