Solved

can't connect to my ftp - - unknown error number

Posted on 2004-10-14
8
654 Views
Last Modified: 2007-12-19
so I am running suse linux enterprise 9, and pure-ftp.  I made sure that the ftpd is running.  When I try to connect to it, I get ftp: connect: unknown error number.

When I allow anonymous in the config file, I can connnect, but can't log in as anything but anonymous.  At one point, I had it so I could log in as a user, and change directories, but an ls would return something like "could not display the contents of .."

I'm sure I just need help with the config file, I would be happy to post it, or email it.  

Thanks.
0
Comment
Question by:wirthr
  • 5
  • 2
8 Comments
 
LVL 2

Expert Comment

by:Sunjith
ID: 12311239
Check if you have configured the user config file correctly
0
 
LVL 4

Expert Comment

by:EinarTh
ID: 12317450
also check out /etc/pam.d/ and see how you are authenticating ftp users
0
 
LVL 6

Author Comment

by:wirthr
ID: 12320104
could you be a little more specific?  I'm not a total linux newbie, but where is the user config file, and what in pam.d am I looking for.  Thanks for the help.
0
 
LVL 6

Author Comment

by:wirthr
ID: 12320122
mail:~ # cd /etc/pam.d
mail:/etc/pam.d # ls
.      cups           openwbem  pure-ftpd  rpasswd  sshd     xdm
..     gdm            other     quagga     rsh      su       xdm-np
chage  gdm-autologin  passwd    radiusd    samba    sudo     xlock
chfn   login          pop3      rexec      shadow   useradd  xscreensaver
chsh   netatalk       ppp       rlogin     squid    vsftpd
mail:/etc/pam.d # vi pure-ftpd
#%PAM-1.0
auth       required     pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
auth       required     pam_unix2.so            nullok
auth       required     pam_shells.so
account    required     pam_unix2.so
password   required     pam_pwcheck.so          nullok
password   required     pam_unix2.so            nullok use_first_pass use_authtok
session    required     pam_unix2.so            none

~
~
~
~
~
~
~
~
~
~
~
~
"pure-ftpd" 9L, 379C                                          1,1           All
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 6

Author Comment

by:wirthr
ID: 12320442
so, I changed a few things, and now I can login as a user, and see everything down to the /srv/www directory, and cd into htdocs from there, but then when I do an ls is says unable to read .

maybe a permissions thing?  


drwxr-xr-x  2 root root      136 Oct 12 07:39 cgi-bin
drwxr-xr-x  4 root root      128 Oct 12 07:32 htdig
drwxrwx-wx  4 root ftp-users 496 Oct 13 09:24 htdocs
drwxr-xr-x  2 root root      144 Oct 12 08:23 icons
mail:/srv/www #
0
 
LVL 6

Author Comment

by:wirthr
ID: 12320477
got it!

I chmod 755 htdocs and chown root:root htdocs

that worked.
0
 
LVL 6

Author Comment

by:wirthr
ID: 12320543
can't make a directory though, I get permission denied
hmmm
0
 
LVL 4

Accepted Solution

by:
EinarTh earned 500 total points
ID: 12321671
thats because you have 755 (read,write,execute for owner & read and execute for group and others) Note that execute permission on directories means that you may list their contents. If you dont have write access you cannot create subdirectories or files.

Which user does the ftp server run as? and in which groups does that user belong? The permissions on the files and directories have to allow that user/group write access to some level for you to be able to create files and directories via ftp.

cheers
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java / Linux and Regular Expressions 11 68
LINUX CENTOS + APACHE 9 60
Virtualizing very old guest OS 4 77
VirtualBox in Fedora 25 Linux:  Unable to Install OS 11 135
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now