Networking Forums

Networking Forums > Computer Networking > Linux Networking > FTP question

Reply
 
 
Cage
Guest
Posts: n/a

 
      07-16-2004, 08:56 PM
This is a little drawn out but it comes down to an ftp issue. I have a
Clicksmart 310 digital camera. I am trying to set it up to ftp pics to
my website. I'm trying to use the webcam app that comes with xawtv.
(I've tried about a dozen other apps and this one seems closest to my
needs) I have it setup to grab images from the camera but the problem is
getting it to ftp. Now I also have camstream setup and it ftp's pics to
my site but it only does it on demand, not at given intervals. I want it
to work without my intervention until I'm done. Anyway I have the ftp
settings the same in both programs. The camstream ftp works. But
webcam's doesn't. I've done some searches and it comes down to it is
looking for the .netrc file in my home directory. I haven't found much
if anything on how to format this file. webcam will not establish an ftp
connection without the settings in this file. How should the settings in
my user's .netrc file look (man ftp doesn't tell me enough).

Or what other program could I use to ftp pics from my cam to the
website. I'm trying to use static pics with a meta page updating every 5
seconds as opposed to continuous stream due to dial up and simpler code.
 
Reply With Quote
 
 
 
 
Doug Laidlaw
Guest
Posts: n/a

 
      07-17-2004, 10:20 PM
Cage wrote:

> This is a little drawn out but it comes down to an ftp issue. I have a
> Clicksmart 310 digital camera. I am trying to set it up to ftp pics to
> my website. I'm trying to use the webcam app that comes with xawtv.
> (I've tried about a dozen other apps and this one seems closest to my
> needs) I have it setup to grab images from the camera but the problem is
> getting it to ftp. Now I also have camstream setup and it ftp's pics to
> my site but it only does it on demand, not at given intervals. I want it
> to work without my intervention until I'm done. Anyway I have the ftp
> settings the same in both programs. The camstream ftp works. But
> webcam's doesn't. I've done some searches and it comes down to it is
> looking for the .netrc file in my home directory. I haven't found much
> if anything on how to format this file. webcam will not establish an ftp
> connection without the settings in this file. How should the settings in
> my user's .netrc file look (man ftp doesn't tell me enough).
>
> Or what other program could I use to ftp pics from my cam to the
> website. I'm trying to use static pics with a meta page updating every 5
> seconds as opposed to continuous stream due to dial up and simpler code.


I assume that you have looked on Google. The summary of this page looks
promising:

www.mavetju.org/unix/netrc.php

HTH,

Doug.
--
ICQ Number 178748389. Registered Linux User No. 277548.
When the doors of perception are cleansed everything appears as it truly is
- infinite.
- William Blake.

 
Reply With Quote
 
Robert E A Harvey
Guest
Posts: n/a

 
      07-18-2004, 08:45 AM
Cage <(E-Mail Removed)> wrote
> How should the settings in
> my user's .netrc file look (man ftp doesn't tell me enough).


Have you tried man netrc ?

It should contain something like:
THE .netrc FILE
The .netrc file contains login and initialization information
used by the
auto-login process. It resides in the user's home directory.
The fol-
lowing tokens are recognized; they may be separated by spaces,
tabs, or
new-lines:

machine name
Identify a remote machine name. The auto-login process
searches
the .netrc file for a machine token that matches the
remote ma-
chine specified on the ftp command line or as an open
command
argument. Once a match is made, the subsequent .netrc
tokens
are processed, stopping when the end of file is reached
or an-
other machine or a default token is encountered.

default This is the same as machine name except that default
matches
any name. There can be only one default token, and it
must be
after all machine tokens. This is normally used as:

default login anonymous password user@site

thereby giving the user automatic anonymous ftp login
to ma-
chines not specified in .netrc. This can be overridden
by using
the -n flag to disable auto-login.

login name
Identify a user on the remote machine. If this token
is pre-
sent, the auto-login process will initiate a login
using the
specified name.

password string
Supply a password. If this token is present, the
auto-login
process will supply the specified string if the remote
server
requires a password as part of the login process. Note
that if
this token is present in the .netrc file for any user
other
than anonymous, ftp will abort the auto-login process
if the
.netrc is readable by anyone besides the user.

account string
Supply an additional account password. If this token
is pre-
sent, the auto-login process will supply the specified
string
if the remote server requires an additional account
password,
or the auto-login process will initiate an ACCT command
if it
does not.

macdef name
Define a macro. This token functions like the ftp
macdef com-
mand functions. A macro is defined with the specified
name;
its contents begin with the next .netrc line and
continue until
a null line (consecutive new-line characters) is
encountered.
If a macro named init is defined, it is automatically
executed
as the last step in the auto-login process.

----------------------------------------------------------------------
I use this sort of thing all the time.
~/.netrc contains
machine <remote_host_name> username <the_name> password
<the_password>
default username anonymous password (E-Mail Removed)
then you can just run a script on a cron job , or something, that
contains
ftp <remote_host_name>
cd /pub/incoming
binary
put file.dat default.dat
quit

OK, the username and password are stored in the clear, but your home
directory and the ~/.netrc should be set to be inaccessible by anyone
else. And it is a special username/password, surely? not the same
one you use for everything?
 
Reply With Quote
 
Cage
Guest
Posts: n/a

 
      07-18-2004, 01:59 PM
Robert E A Harvey wrote:
> Cage <(E-Mail Removed)> wrote
>
>>How should the settings in
>>my user's .netrc file look (man ftp doesn't tell me enough).

>
>
> Have you tried man netrc ?
>
> It should contain something like:
> THE .netrc FILE
> The .netrc file contains login and initialization information
> used by the
> auto-login process. It resides in the user's home directory.
> The fol-
> lowing tokens are recognized; they may be separated by spaces,
> tabs, or
> new-lines:
>
> machine name
> Identify a remote machine name. The auto-login process
> searches
> the .netrc file for a machine token that matches the
> remote ma-
> chine specified on the ftp command line or as an open
> command
> argument. Once a match is made, the subsequent .netrc
> tokens
> are processed, stopping when the end of file is reached
> or an-
> other machine or a default token is encountered.
>
> default This is the same as machine name except that default
> matches
> any name. There can be only one default token, and it
> must be
> after all machine tokens. This is normally used as:
>
> default login anonymous password user@site
>
> thereby giving the user automatic anonymous ftp login
> to ma-
> chines not specified in .netrc. This can be overridden
> by using
> the -n flag to disable auto-login.
>
> login name
> Identify a user on the remote machine. If this token
> is pre-
> sent, the auto-login process will initiate a login
> using the
> specified name.
>
> password string
> Supply a password. If this token is present, the
> auto-login
> process will supply the specified string if the remote
> server
> requires a password as part of the login process. Note
> that if
> this token is present in the .netrc file for any user
> other
> than anonymous, ftp will abort the auto-login process
> if the
> .netrc is readable by anyone besides the user.
>
> account string
> Supply an additional account password. If this token
> is pre-
> sent, the auto-login process will supply the specified
> string
> if the remote server requires an additional account
> password,
> or the auto-login process will initiate an ACCT command
> if it
> does not.
>
> macdef name
> Define a macro. This token functions like the ftp
> macdef com-
> mand functions. A macro is defined with the specified
> name;
> its contents begin with the next .netrc line and
> continue until
> a null line (consecutive new-line characters) is
> encountered.
> If a macro named init is defined, it is automatically
> executed
> as the last step in the auto-login process.
>
> ----------------------------------------------------------------------
> I use this sort of thing all the time.
> ~/.netrc contains
> machine <remote_host_name> username <the_name> password
> <the_password>
> default username anonymous password (E-Mail Removed)
> then you can just run a script on a cron job , or something, that
> contains
> ftp <remote_host_name>
> cd /pub/incoming
> binary
> put file.dat default.dat
> quit
>
> OK, the username and password are stored in the clear, but your home
> directory and the ~/.netrc should be set to be inaccessible by anyone
> else. And it is a special username/password, surely? not the same
> one you use for everything?

That info is in the man ftp page. And I tried it according to what it
said and it didn't work. At least how I decyphered it. It's really kind
of cryptic. I was looking for an example to go off of to format mine.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Skip the PW question: I got that, question now about "Home" Tim Wilson Network Routers 1 12-31-2005 04:01 AM
Switch Question - restate previous question w/no subject SEAN J Windows Networking 2 11-30-2005 02:42 PM
Dell 2300 TrueMobile router question/ general wireless question Craig Wireless Internet 2 01-11-2004 06:26 PM



1 2 3 4 5 6 7 8 9 10 11