FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 27th, 2010, 10:16 PM
groundlevel groundlevel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 407 groundlevel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 18 h 48 m 38 sec
Reputation Power: 10
To "//" or not to "/"

I'm having kind of a weird issue using curl to ftp upload images and other files.

When I use what I thought is the standard form:

Code:
curl -s -S -v -u login:pwd FTP://myserver.com/usr/home/grndlvl/public_html/posthumour/images/ -T '/Volumes/Macintosh HD/Users/jeffrey/Pictures/mp/test.jpg'


I can't upload anything, but when I use:

Code:
curl -s -S -v -u login:pwd FTP://myserver.com//usr/home/grndlvl/public_html/posthumour/images/ -T '/Volumes/Macintosh HD/Users/jeffrey/Pictures/mp/test.jpg'


I can. I checked with my isp, and they say it is not specific to them:

server.xxx.com/bin
server.xxx.com//usr/home/user/bin

are both valid.

What is the most generally expected form for most servers?

Last edited by groundlevel : February 27th, 2010 at 10:20 PM.

Reply With Quote
  #2  
Old February 28th, 2010, 12:39 AM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,717 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 7 h 29 m 55 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
What's expected is you use locations relative to your initial FTP directory.
Code:
FTP://myserver.com/public_html/posthumour/images/



Quote:
Originally Posted by groundlevel
I can. I checked with my isp, and they say it is not specific to them:

server.xxx.com/bin
server.xxx.com//usr/home/user/bin

are both valid.

Are you saying you can browse to http://server.xxx.com/bin and get the same stuff at http://server.xxx.com//usr/home/user/bin?

Reply With Quote
  #3  
Old February 28th, 2010, 08:11 PM
groundlevel groundlevel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 407 groundlevel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 18 h 48 m 38 sec
Reputation Power: 10
They're being obtuse.

So I think I'm going to try just straight ftp. Can you tell me the correct command given the parameters to upload to a specific directory with the login and password?

If you happen to know if such a thing is possible with sftp or even scp, that would be even better.

Reply With Quote
  #4  
Old February 28th, 2010, 09:15 PM
holodoc's Avatar
holodoc holodoc is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2004
Location: Kostolac, Serbia
Posts: 855 holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level)holodoc User rank is General 6th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 4 h 47 m 40 sec
Reputation Power: 1390
Secure your FTP server immediately by chrooting its users since its clear that you don't want anyone taking a peak at your /etc/passwd etc. That way you will limit all your users to access only their home folders.

If you are using vsftp then you can simply open the /etc/vsftpd/vsftpd.conf and change the chroot_local_user setting to look like the following line
Code:
chroot_local_user=YES
. If there is none add it right at the end of the file.

After that restart vsftpd with
Code:
service vsftpd restart
.

That is the obvious reason why you are able to traverse that web server the way you do it.

As for the second question you might be better of with using ncftp or similar, more secure, client. The method you are using is considered to be obsolete now from a security point of view although that might not be the biggest problem you have currently considering you server setup
__________________
PHP Code:
<?php
abstract class Ignorance extends Stupidity implements Unavoidable 
     public static 
$humiliation

     private function 
__construct(){
        
parent::__destruct();
     }; 

?>

Last edited by holodoc : February 28th, 2010 at 09:19 PM.

Reply With Quote
  #5  
Old February 28th, 2010, 09:45 PM
groundlevel groundlevel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 407 groundlevel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 18 h 48 m 38 sec
Reputation Power: 10
Heh. Noted.

This is actually for an app I'm making. So I can't use someone else's app

I need the actual commands, and I'd like to make them secure, hence sftp or scp as a preference.

But any command line program would work.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > To "//" or not to "/"

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap