]]>Linux下FTP讄 QVsftp)?本地用户配置 vsftp.confhttp://www.aygfsteel.com/kemi/archive/2006/04/01/38613.htmlKimiKimiSat, 01 Apr 2006 08:04:00 GMThttp://www.aygfsteel.com/kemi/archive/2006/04/01/38613.htmlhttp://www.aygfsteel.com/kemi/comments/38613.htmlhttp://www.aygfsteel.com/kemi/archive/2006/04/01/38613.html#Feedback0http://www.aygfsteel.com/kemi/comments/commentRss/38613.htmlhttp://www.aygfsteel.com/kemi/services/trackbacks/38613.html
# Example config file /etc/vsftpd/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 #local_root=/var/ftp # # 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 #user_config_dir=/etc/vsftpd/userconf # # 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=NO # # Uncomment this if you want the anonymous FTP user to be able to create # new directories. anon_world_readable_only=NO anon_mkdir_write_enable=NO anon_other_write_enable=NO # # 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 Daphne Linux 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_local_user=yes #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 user_config_dir=/etc/userconf #enable for standalone mode listen=yes tcp_wrappers=yes
要把vnc配置成一系l服务,把你的用户名U加入到下面的配|文件中Q?br /> [code][tchung@tchung101 tchung]$ sudo vi /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs. # # Uncomment the line below to start a VNC server on display :1 # as my 'myusername' (adjust this to your own). You will also # need to set a VNC password; run 'man vncpasswd' to see how # to do that. # # DO NOT RUN THIS SERVICE if your local area network is # untrusted! For a secure way of using VNC, see # URL:http://www.uk.research.att.com/vnc/sshvnc.html
# Firewall configuration written by redhat-config-securitylevel # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0] :FORWARD ACCEPT [0] :OUTPUT ACCEPT [0] :RH-Firewall-1-INPUT - [0] -A INPUT -j RH-Firewall-1-INPUT -A FORWARD -j RH-Firewall-1-INPUT -A RH-Firewall-1-INPUT -i lo -j ACCEPT -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT -A RH-Firewall-1-INPUT -p 50 -j ACCEPT -A RH-Firewall-1-INPUT -p 51 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT [color=red]-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT[/color] -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited COMMIT
[tchung@tchung101 tchung]$ sudo /sbin/service iptables restart Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: filter [ OK ] Unloading iptables modules: [ OK ] Applying iptables firewall rules: [ OK ] [tchung@tchung101 tchung]$
2、配|服务器 (1)配置xfs xfs的配|文件是/etc/X11/fs/configQ内容如下: # # Default font server configuration file for Mandrake Linux workstation #
# allow a max of 4 clients to connect to this font server client-limit = 4
# when a font server reaches its limit, start up a new one clone-self = off
# alternate font servers for clients to use #alternate-servers = foo:7101,bar:7102
# where to look for fonts # Some of these are commented out, i.e. the TrueType and Type1 # directories in /usr/share, because they arent forced to be # installed alongside X. # catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled, /usr/X11R6/lib/X11/fonts/75dpi:unscaled, /usr/X11R6/lib/X11/fonts/100dpi:unscaled, /usr/X11R6/lib/X11/fonts/misc:unscaled, /usr/X11R6/lib/X11/fonts/Type1, /usr/X11R6/lib/X11/fonts/Speedo, /usr/X11R6/lib/X11/fonts/mdk:unscaled, /usr/share/fonts/default/Type1, /usr/share/fonts/ttf/big5, /usr/share/fonts/ttf/gb2312, /usr/share/fonts/ttf/decoratives, /usr/share/fonts/ttf/western
# in 12 points, decipoints default-point-size = 120
# 100 x 100 and 75 x 75 default-resolutions = 75,75,100,1 # how to log errors use-syslog = on