.netrc not working (.netrc file not correct mode)

.netrc not working (.netrc file not correct mode)

Post by The_Duc » Fri, 18 Jul 2003 07:18:08



I cannot figure out why it is 'not correct mode:

testweb - /export/wlserver> ftp bighost.com
Connected to bighost.com.
220 sunprod1 FTP server (SunOS 5.8) ready.
Error - .netrc file not correct mode.
Remove password or correct mode.
221 Goodbye.
ftp> bye

testweb - /export/wlserver> cat .netrc

machine bighost.com
login bighost
password bighostpass

macdef update_production
        cd deploy
        bin
        put test.lst
        quit

testweb - /export/wlserver> ls -al .netrc
-rwxrwxrwx   1 wlserver wladmin      128 Jul 16 17:50 .netrc

--
- The_Duck

Posted via http://dbforums.com

 
 
 

.netrc not working (.netrc file not correct mode)

Post by Andy » Fri, 18 Jul 2003 08:02:45


chmod 600 .netrc should do the trick!

See "man netrc", it's in the first description paragraph.

- Andy


> I cannot figure out why it is 'not correct mode:

> testweb - /export/wlserver> ftp bighost.com
> Connected to bighost.com.
> 220 sunprod1 FTP server (SunOS 5.8) ready.
> Error - .netrc file not correct mode.
> Remove password or correct mode.
> 221 Goodbye.
> ftp> bye

> testweb - /export/wlserver> cat .netrc

> machine bighost.com
> login bighost
> password bighostpass

> macdef update_production
>         cd deploy
>         bin
>         put test.lst
>         quit

> testweb - /export/wlserver> ls -al .netrc
> -rwxrwxrwx   1 wlserver wladmin      128 Jul 16 17:50 .netrc

> --
> - The_Duck

> Posted via http://dbforums.com


 
 
 

.netrc not working (.netrc file not correct mode)

Post by scriptOmati » Fri, 18 Jul 2003 08:05:15



> chmod 600 .netrc should do the trick!

> See "man netrc", it's in the first description paragraph.

> - Andy


> > I cannot figure out why it is 'not correct mode:

> > testweb - /export/wlserver> ftp bighost.com
> > Connected to bighost.com.
> > 220 sunprod1 FTP server (SunOS 5.8) ready.
> > Error - .netrc file not correct mode.
> > Remove password or correct mode.
> > 221 Goodbye.
> > ftp> bye

> > testweb - /export/wlserver> cat .netrc

> > machine bighost.com
> > login bighost
> > password bighostpass

> > macdef update_production
> >         cd deploy
> >         bin
> >         put test.lst
> >         quit

> > testweb - /export/wlserver> ls -al .netrc
> > -rwxrwxrwx   1 wlserver wladmin      128 Jul 16 17:50 .netrc

> > --
> > - The_Duck

> > Posted via http://dbforums.com

FYI: I think some systems (not solaris) require .netrc to be 400

--
http://ftp.opensysmon.com is a shell script archive site with an
open source system monitoring and network monitoring software package.
Many platforms are supplied already compiled.

 
 
 

.netrc not working (.netrc file not correct mode)

Post by Andy » Fri, 18 Jul 2003 08:14:41




>>chmod 600 .netrc should do the trick!

>>See "man netrc", it's in the first description paragraph.

>>- Andy


>>>I cannot figure out why it is 'not correct mode:

>>>testweb - /export/wlserver> ftp bighost.com
>>>Connected to bighost.com.
>>>220 sunprod1 FTP server (SunOS 5.8) ready.
>>>Error - .netrc file not correct mode.
>>>Remove password or correct mode.
>>>221 Goodbye.
>>>ftp> bye

>>>testweb - /export/wlserver> cat .netrc

>>>machine bighost.com
>>>login bighost
>>>password bighostpass

>>>macdef update_production
>>>        cd deploy
>>>        bin
>>>        put test.lst
>>>        quit

>>>testweb - /export/wlserver> ls -al .netrc
>>>-rwxrwxrwx   1 wlserver wladmin      128 Jul 16 17:50 .netrc

>>>--
>>>- The_Duck

>>>Posted via http://dbforums.com

> FYI: I think some systems (not solaris) require .netrc to be 400

Fair call - the Solaris man page just says "to disallow read access by
group and others" so I've never bothered removing write access for myself!
 
 
 

.netrc not working (.netrc file not correct mode)

Post by The_Duc » Fri, 18 Jul 2003 08:02:45


figure it out.
thanks.

Evidentally you need chmod 400 on the file

--
- The_Duck

Posted via http://dbforums.com

 
 
 

.netrc not working (.netrc file not correct mode)

Post by The_Duc » Sat, 19 Jul 2003 02:31:28


yup, thanks to all who replied.

--
- The_Duck

Posted via http://dbforums.com

 
 
 

1. What does "Error - .netrc file not correct mode" mean?

Hi,

I'd like to configure a machine so it can ftp
to another host without an interactive password
and username.

I'm running Solaris 2.5 and don't have a C compiler
(so I can't use ncftp).

I created a .netrc file which looks something like :

machine wwwdev login genericid password zyxwvut

I added an entry to /etc/inet/hosts to the machine
I want to ftp to.

Ah, but when I got to ftp the following displays :

Connected to webdev.corp.rhalf.com.
220 wwwdev FTP server (UNIX(r) System V Release 4.0) ready.
Error - .netrc file not correct mode.
Remove password or correct mode.
221 Goodbye.
ftp> bye

...

For starters I have .netrc chmoded to 1777.

What does the message "Error - .netrc file not correct mode." mean?

Thanks,

Emmett

2. NEWBIE needs your HELP!!!

3. Netrc not correct mode(?) - error help>

4. NIS+ multiple UID entries

5. ftp and .netrc does not work?

6. ROUTING PROBLEMS

7. NETRC macro not xferring occasional file

8. Price for Solaris x86 System

9. FTP not reading .netrc ??

10. .netrc mode?

11. .netrc doesn't work.

12. What's the trick in making .netrc work ?

13. question on the use of the .netrc file