LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   FTP problems in RedHat 7.2 (https://www.linuxquestions.org/questions/linux-newbie-8/ftp-problems-in-redhat-7-2-a-22490/)

jholbrook 06-03-2002 04:18 PM

FTP problems in RedHat 7.2
 
WHY I AM POSTING: I'm having trouble figuring out what is going on with my FTP server that I just set up. I had it running once before, but now it seems to have problems.

WHAT I DID: I re-installed RedHat 7.2, and I selected the "high" firewall security, but I also checked the little box to allow FTP through. The installation screen says that this will work, as long as users connect in PASV mode. I then created a guest user account for someone (by doing useradd, then editing /etc/ftpaccess and /etc/passwd to mark them as a guest user with a specific home directory).

HERE IS MY PROBLEM: On another computer, I downloaded an FTP client and installed it. I set it up with the correct login, password, IP address and PASV mode. It seems to connect just fine, all the way down to the point where it says "retrieving file list." Then it seems to hang for a very long time. However, the user's home directory does finally show up. But there aren't any files showing in it. And when I try to upload, it seems like it takes a very long time again, then finally goes back to "awaiting command," but again the file doesn't actually show up.

THIS IS MY QUESTION: Does this problem have to do with permissions, ports, both or neither? In case it helps, I noticed in the FTP dialog box while I was doing this that after it says all the stuff about password required, user logged in, /XYZ is your current directory, etc., etc., then it says:


200 Type set to A
PASV
227 Entering Passive Mode (192,168,XXX,XXX,4X,2XX)
(#Note: all those X's were numbers, obviously.)
LIST
TYPE A
TYPE A
200 NOOP Command Successful
(#Note: This is where I was trying to upload....)
TYPE A
200 NOOP Command Successful


So, what the heck is NOOP, what the heck is TYPE A, and is this what is messing me up? Thanks very much for any help you folks can offer.

Please feel free to email me with suggestions at jholb@bellsouth.net. Thanks

MartBrooks 06-04-2002 05:00 AM

"NOOP" is short for "NO OPeration" or in other words do nothing.

TYPE defines the way data will be sent A being ASCII and B being binary. The difference being that in ASCII mode only 7 bits of each byte will be sent as ASCII text will not use the highest bit.

The gotcha here is that if you transfer a binary file (i.e. pretty much anything other than plain text) in ASCII mode, you will corrupt it and render it unusable.

Regards

Noerr 06-04-2002 05:29 AM

make sure you have proper permissions on directory where you allow connecting (root ftp dir, or user home dir)

jholbrook 06-04-2002 11:22 AM

Thank you both for posting, I appreciate it.

Noerr - I don't think permissions is the issue, because I also tried connecting as a regular user who has a login on the host machine. Everything was pretty much the same: acting like it's hung up but then finally displaying home/username. But again, there were no files present and I could not upload.

MartBrooks - Could the problem be the fact that some of the ports are not open on the server's internal firewall? I thought PASV mode worked around that, by letting the server specify where everything would happen, but maybe that's the issue....?

If anyone else has any suggestions for how to fix this, please let me know. Thanks very much.

Noerr 06-05-2002 05:05 AM

you need to duble check your root dir, if that isn't ok it won't work regardless what user has logged in

jholbrook 06-05-2002 11:05 AM

I'm sorry, but I don't know very much about this. Can you tell me what you mean? What do I need to check?

--Thanks again.

Noerr 06-05-2002 03:55 PM

checkout my old (now I use proftpd) config
this will work 99%
regards

-----------------------------------------------------
# class can have name instead of all (local, remote whatever)
class all real,guest 0.0.0.0/0


guestuser *
realuser root
#realgroup ftpusers

pasv-allow all 0.0.0.0/0
port-allow all 0.0.0.0/0
keepalive yes

# deny user with specific UID
deny-uid %1-499 %1800-
deny-gid %1-499 %1800-
allow-uid ftp
allow-gid ftp

# Default directory for the guests (overwrites dir in /etc/passwd)
guest-root /ftp
guest-root /ftp/nacrti %1700-1706 %1708-1799
# Allow uploading in the following dir
upload /ftp /pub/upload yes

email root@localhost

loginfails 3

readme README* login
readme README* cwd=*

message /etc/ftp/welcome.msg login all
message /etc/ftp/chdir.msg cwd=* all

umask no all
defumask 0002 all
compress yes all
tar yes all
#chmod no guest

log syslog

shutdown /etc/ftp/shut.msg
timeout accept 120
timeout connect 120
timeout data 1200
timeout idle 900
timeout maxidle 1200
timeout RFC931 100

passwd-check rfc822 warn

jholbrook 06-05-2002 04:15 PM

Thanks very much, you're a champ. I will give that a shot tonight. I appreciate the way you have followed up on all these posts. Hopefully it's helped some other people as well.

Sincerely,

J. Holbrook

Noerr 06-06-2002 07:30 AM

btw, rather go for proftpd ;)

good luck


All times are GMT -5. The time now is 01:30 PM.