2007年9月24日星期一

解决MySQL镜像master/slaver不同步的问题

一台主Mysql服务器,上面开了两个Mysql应用:3306,3307;两台从Mysql服务器。今天早上发现从服务器的3306都未和主服务器同步。
登录从服务器的mysql:
mysql> show slave status\G
********* 1. row ***********
Master_Host: xx.xxx.xxx.xxx
Master_User: repl
Master_Port: 3306
Connect_retry: 60
Master_Log_File: app2-bin.001
Read_Master_Log_Pos: 214
Relay_Log_File: db2-relay-bin.001
Relay_Log_Pos: 295
Relay_Master_Log_File: app2-bin.001
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_do_db:
Replicate_ignore_db: mysql
Last_errno: 0
Last_error:
Skip_counter: 0
Exec_master_log_pos: 214
Relay_log_space: 2951
row in set (0.00 sec)

发现Slave_IO_Running: No Slave_SQL_Running: No 这两项都停掉了

mysql> slave start;

重新打开slave监控就OK了!查看error日志发现是Relay_Log_File的文件名未指明,my.conf里面指明就好了~

阅读全文...

2007年9月12日星期三

vsftpd: 怎样取消(禁用)本地用户的删除权限

引用:原帖由 wolfg 于 2006-2-28 09:41 发表
cmds_allowed

This options specifies a comma separated list of allowed FTP commands (post login. USER, PASS and QUIT are always allowed pre-login). Other commands are rejected. This is a powerf ...

找到一个详细一点的:
http://wiki.nightlabs.de/en/Documentation:Linux/vsftpd
A common problem is to force certain file permissions for new files. There is file_open_mode and local_umask, but what drove me nearly crazy is that some clients do a chmod!!! E.g. when using konqueror, the permission related settings in /etc/vsftpd.conf just do not have any effect at all. The solution came with the option cmds_allowed. Here is an excerpt from my /etc/vsftpd.conf. Note, that lines beginning with "#" are comments and "\" marks that the following line should directly be appended (no linefeed in /etc/vsftpd.conf). The following line forbids the command for setting file permissions (by allowing everything except SITE):

cmds_allowed=ABOR,CWD,DELE,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RETR,\
RMD,RNFR,RNTO,SIZE,STOR,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,\
NOOP,REIN,STAT,STOU,STRU,SYST
---------------------------------------------
以前的精彩贴: http://www.chinaunix.net/jh/15/661281.html
cmds_allowed=ABOR,APPE,CWD,CDUP,FEAT,LIST,MKD,MDTM,PASS,PASV,PWD,QUIT,RETR,REST,\
STOR,STRU,TYPE,USER

阅读全文...