请教redhat as 3.0 的ftp开通和xmanager连接问题

发布于 2022-10-02 19:27:29 字数 7838 浏览 19 评论 0

我是超级菜鸟,刚开始学linux,单位要装一个ftp,没想到碰到了很多问题。望各位大虾多多指点。

如果有大虾能够知道的,不放顺便说说解决思路,我自己觉得处理问题的效率太低,可能是看问题的方法不对,很想改进!!

我安装的是:REDHAT.ENTERPRISE.LINUX.AS.V3.0.UPDATE.3-RORiSO
从一个ftp下载的,安装后有以下问题。

1、配置xmanager不成功,可以发现机子,但不能出现图形界面
2、配置ftp后,服务启动正常,但用netstat -l 查看,没有ftp的监听,远程无法连接。
3、root登陆无法锁定屏幕

一、xmanager的问题
看过《linux版精华贴分类索引(2005/01/10更新) 》中的文章,
并查看了xmanager的FAQ,
XDMCP connection fails for Linux. How do I configure my Linux box?
How to configure Linux XDMCP(KDE/GNOME) settings for Xmanager

Affected Files

For runlevel: /etc/inittab
For GDM: /etc/X11/gdm/gdm.conf
For KDM: /etc/X11/xdm/xdm-config
/etc/X11/xdm/Xaccess
/etc/X11/xdm/kdmrc
/usr/share/kdm/kdmrc
/usr/share/config/kdm/kdmrc
/etc/opt/kde2/share/config/kdm/kdmrc
For Firewall: /etc/sysconfig/ipchains

Step 1. Change runlevel to enable gdm or kdm.

Open /etc/inittab file.
Change the runlevel to 5 as following:

id:5:initdefault:
Step 2. GDM configuration (When the Linux is using gdm)

Open /etc/X11/gdm/gdm.conf file.
Go to the [xdmcp]section.
Set the value of "Enable" option to "1".
Step 3. KDM configuration (When the Linux is using kdm)

Open /etc/X11/xdm/xdm-config file.
Comment out "requestPort" option as following:
DisplayManager.requestPort: 0
==>;
!DisplayManager.requestPort: 0
Open /etc/X11/xdm/Xaccess file.
Remove the initial "#" character for the following line:
#* #any host can get a login window
==>;
* #any host can get a login window
Open /etc/X11/xdm/kdmrc,
/usr/share/config/kdm/kdmrc or
/etc/opt/kde2/share/config/kdm/kdmrc file.
Change the value of "Enable" option to "true".
Step 4. Firewall configuration (If the firewall has been configured)

Open /etc/sysconfig/ipchains file.
Add the following lines at the top of the file:

-A input -p udp -s 0/0 -d 0/0 177 -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 telnet -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 ssh -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 login -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 exec -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 shell -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 7100 -j ACCEPT
Step 5. Restart your Linux to activate the changes.

以上都已经进行了设置,但还是不行。

二、VSFTPD的问题

看过《redhat linux 9.0 VSFTP配置大权(转载) 》等文章

/sbin/service vsftpd start 已经把服务起来,而且用
/sbin/chkconfig --level 345 tftp on并设为345引导期间启用

但远处ftp就是连接不上(防火墙规则已加)

我的vsftpd.conf文件如下
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES

pam_service_name=vsftpd
userlist_enable=YES
#enable for standalone mode
listen=YES
tcp_wrappers=YES
setproctitle_enble=YES
anon_root=/var/ftp/pub
listen_port=21

我真的无语咯。请各位指点。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

梦途 2022-10-09 19:27:29

另外很奇怪的是,/sbin/service vsftpd stop时会失败。restart也不行。不知道怎么回事。

xshell可以连上系统,输入redhat-config-securitylevel等命令可以跳出图形窗口。我的桌面是GNOME的。但用xmanger能监听到177端口,就是不能显示图形。

海螺姑娘 2022-10-09 19:27:29

你贴的垃圾太多了,遇到问题拣关键的地方说!


service iptables stop
然后
netstat -an|grep 177
netstat -an|grep 7100
netstat -an|grep 21

有什么提示贴上来再说

面如桃花 2022-10-09 19:27:29

先把防火墙停掉再试试,内网就不要用什么防火墙了,除非你对它的规则很熟悉,否则只会增加新手对linux的恐惧……

风吹雪碎 2022-10-09 19:27:29

谢谢,总算有高手进来咯。呵呵

[root@ftp pam.d]# service iptables stop
Flushing firewall rules:                                   [  确定  ]
Setting chains to policy ACCEPT: filter                    [  确定  ]
Unloading iptables modules:                                [  确定  ]
[root@ftp pam.d]# netstat -an|grep 177
udp        0      0 0.0.0.0:177             0.0.0.0:*                           
[root@ftp pam.d]# netstat -an|grep 7100
unix  2      [ ACC ]     STREAM     LISTENING     2404   /tmp/.font-unix/fs7100
unix  3      [ ]         STREAM     CONNECTED     22815  /tmp/.font-unix/fs7100
[root@ftp pam.d]# netstat -an|grep 21
unix  2      [ ACC ]     STREAM     LISTENING     2521   /tmp/orbit-root/linc-853-0-1069a2b324457
unix  3      [ ]         STREAM     CONNECTED     23221  /tmp/.X11-unix/X0
unix  2      [ ]         DGRAM                    2143   
[root@ftp pam.d]#

决绝 2022-10-09 19:27:29

[quote]原帖由 "ingood"] pam.d]#[/quote 发表:

7100和21没有listen

检查xfs和vsftpd配置是否正确

回梦 2022-10-09 19:27:29

是不是这个问题啊
Step 6) Set up PAM for local logins (optional)

If you are running vsftpd on a PAM enabled machine, you will need to have a
/etc/pam.d/ftp file present, otherwise non-anonymous logins will fail. [NOTE -
if you have an older version of PAM, that file might be /etc/pam.conf]

For a standard setup, you can just copy a provided example file:
cp RedHat/vsftpd.pam /etc/pam.d/ftp

但系我的 RedHat文件夹里好像没有vsftpd.pam 这个文件。呵呵

独孤求败 2022-10-09 19:27:29

原帖由 "ingood" 发表:

if you have an older version of PAM, that file might be /etc/pam.conf]

For a standard setup, you can just copy a provided example file:
cp RedHat/vsftpd.pam /etc/pam.d/ftp

但系我的 RedHat文..........

你的vsftpd没启动起来,具体的错误信息vi /etc/log/messages,解决问题要多尝试,多思考,多查阅,少说话

鸠魁 2022-10-09 19:27:29

我防火墙开成全通的都没用,所以,我觉得不是防火墙的问题。

xfs我还真没配置,不知道要做什么配置

少女净妖师 2022-10-09 19:27:29

我防火墙开成全通的都没用,所以,我觉得不是防火墙的问题。

xfs我还真没配置,不知道要做什么配置。

vsftpd.conf我已经帖出来了,不知道有什么问题没有。是不是象我上面说的那个问题。vsftpd.pam在哪儿有

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文