Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.netrc ftp Error

Status
Not open for further replies.

alan147

Technical User
Nov 15, 2002
128
GB
I am trying to set up a .netrc file so that I can FTP files from one machine to another in a script.

I have created a .netrc file with the machine name login and password for the remote machine and a macro. When I execute an FTP to the machine in the .netrc file I get an error message saying

Error - .netrc file not correct mode.
Remove password or correct mode.


If I remove the password and then FTP I am prompted for a password as expected, then when I enter the password the transfer works fine.

Any ideas what is wrong?

Thanks

Alan
 
You need to chmod 600 .netrc to prevent other users from reading the passwords in it. The error message is a security measure. Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top