<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.feedsky.com/styles/temp01.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feed.feedsky.com/LiYue_tech" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/LiYue_tech" type="application/rss+xml"></fs:self_link><lastBuildDate>Wed, 14 Jul 2010 08:37:23 GMT</lastBuildDate><title>Li Yue [学习笔记]</title><description>技术笔记</description><link>http://www.liyue.org/tech</link><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><language>en</language><pubDate>Sun, 18 Jul 2010 02:14:54 GMT</pubDate><item><title>TinySlideshow幻灯片相册代码</title><link>http://www.liyue.org/tech/archives/220</link><wfw:commentRss>http://www.liyue.org/tech/archives/220/feed</wfw:commentRss><slash:comments>0</slash:comments><description>　　在制作图片幻灯片相册效果时，发现了这个开源的TinySlideshow代码，采用DIV+CSS+JS控制的代码，可以很好的适应各种情况，通过修改CSS文件，可以控制相册的大小等展示风格，通过修改html页面来控制数据的读取，很好的结合任何一款内容发布系统，各数据信息都是分离的。可以加以推广应用到WEB开发中。&lt;img src=&quot;http://www1.feedsky.com/t1/411577565/LiYue_tech/feedsky/s.gif?r=http://www.liyue.org/tech/archives/220&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/LiYue_tech/411577565/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/LiYue_tech/411577565/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>TinySlideshow</category><category>javascript</category><category>相册</category><pubDate>Wed, 14 Jul 2010 16:37:23 +0800</pubDate><author>李悦</author><comments>http://www.liyue.org/tech/archives/220#comments</comments><guid isPermaLink="false">http://www.liyue.org/tech/archives/220</guid><dc:creator>李悦</dc:creator><fs:srclink>http://www.liyue.org/tech/archives/220</fs:srclink><fs:srcfeed>http://www.liyue.org/tech/feed</fs:srcfeed><fs:itemid>feedsky/LiYue_tech/~8013450/411577565/6122425</fs:itemid></item><item><title>Apache自定义错误信息并跳转到各自网站首页</title><link>http://www.liyue.org/tech/archives/203</link><wfw:commentRss>http://www.liyue.org/tech/archives/203/feed</wfw:commentRss><slash:comments>0</slash:comments><description>一、自定义错误信息页面，并根据所请求的URL所在的域，跳转到所在域名。 二、自定义APACHE错误信息，指定错误信息页面。配置文件里面有例子信息，去掉下面的注释符号#，激活。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Alias /error/ &amp;#34;/usr/local/apache2/error/&amp;#34; &amp;#160; &amp;#60;Directory &amp;#34;/usr/local/apache2/error&amp;#34;&amp;#62; AllowOverride None Options IncludesNoExec AddOutputFilter Includes html AddHandler type-map var Order allow,deny Allow from all LanguagePriority en [...]&lt;img src=&quot;http://www1.feedsky.com/t1/411577566/LiYue_tech/feedsky/s.gif?r=http://www.liyue.org/tech/archives/203&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/LiYue_tech/411577566/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/LiYue_tech/411577566/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>apache</category><category>web优化</category><pubDate>Fri, 08 Jan 2010 14:06:01 +0800</pubDate><author>李悦</author><comments>http://www.liyue.org/tech/archives/203#comments</comments><guid isPermaLink="false">http://www.liyue.org/tech/?p=203</guid><dc:creator>李悦</dc:creator><fs:srclink>http://www.liyue.org/tech/archives/203</fs:srclink><fs:srcfeed>http://www.liyue.org/tech/feed</fs:srcfeed><fs:itemid>feedsky/LiYue_tech/~8013450/411577566/6122425</fs:itemid></item><item><title>apache性能优化之启用gzip压缩</title><link>http://www.liyue.org/tech/archives/199</link><wfw:commentRss>http://www.liyue.org/tech/archives/199/feed</wfw:commentRss><slash:comments>0</slash:comments><description>首先查看apache是否加载了mod_deflate.so模块，如果没有需要安装加载。 找到并下载和当前apache版本相同的源码文件，解压缩到/home目录下， 在apache安装目录下执行： /usr/local/apache2/bin/apxs -i -c /home/httpd-2.0.63/modules/filters/mod_deflate.c 会自动在 httpd.conf添加 LoadModule deflate_module modules/mod_deflate.so 添加如下设置： &amp;#60;IfModule mod_deflate.c&amp;#62; &amp;#60;Location /&amp;#62; #Insert filter SetOutputFilter DEFLATE # Netscape 4.x has some problems… BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4\.0[678] no-gzip # MSIE masquerades as Netscape, but it is fine # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # [...]&lt;img src=&quot;http://www1.feedsky.com/t1/411577567/LiYue_tech/feedsky/s.gif?r=http://www.liyue.org/tech/archives/199&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/LiYue_tech/411577567/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/LiYue_tech/411577567/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>gzip</category><category>mod_deflate</category><category>apache</category><category>web优化</category><pubDate>Mon, 30 Nov 2009 21:36:39 +0800</pubDate><author>李悦</author><comments>http://www.liyue.org/tech/archives/199#comments</comments><guid isPermaLink="false">http://www.liyue.org/tech/?p=199</guid><dc:creator>李悦</dc:creator><fs:srclink>http://www.liyue.org/tech/archives/199</fs:srclink><fs:srcfeed>http://www.liyue.org/tech/feed</fs:srcfeed><fs:itemid>feedsky/LiYue_tech/~8013450/411577567/6122425</fs:itemid></item><item><title>apache安全性调整</title><link>http://www.liyue.org/tech/archives/197</link><wfw:commentRss>http://www.liyue.org/tech/archives/197/feed</wfw:commentRss><slash:comments>0</slash:comments><description>对 web服务器进行安全性端口扫描，发现一些问题，apache加以调整： 1、HTTP TRACE method 需要关闭HTTP TRACE 方法，检测apache是否打开了trace方法，使用如下方法： telnet 127.0.0.1 80 Trying 127.0.0.1&amp;#8230; Connected to 127.0.0.1. Escape character is &amp;#8216;^]&amp;#8217;. TRACE / HTTP/1.0 Host: foo 然后按两次回车，出现下面的信息，证明方法激活了。 HTTP/1.1 200 OK Date: Sat, 20 Oct 2007 20:39:36 GMT Server: Apache/2.2.6 (Debian) Connection: close Content-Type: message/http TRACE / HTTP/1.0 Host: foo 否则会出现： HTTP/1.1 403 Forbidden 等信息。 解决方法：修改httpd.conf，修改如下数值：TraceEnable Off [...]&lt;img src=&quot;http://www1.feedsky.com/t1/411577568/LiYue_tech/feedsky/s.gif?r=http://www.liyue.org/tech/archives/197&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/LiYue_tech/411577568/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/LiYue_tech/411577568/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>apache</category><category>web优化</category><pubDate>Mon, 30 Nov 2009 20:44:00 +0800</pubDate><author>李悦</author><comments>http://www.liyue.org/tech/archives/197#comments</comments><guid isPermaLink="false">http://www.liyue.org/tech/?p=197</guid><dc:creator>李悦</dc:creator><fs:srclink>http://www.liyue.org/tech/archives/197</fs:srclink><fs:srcfeed>http://www.liyue.org/tech/feed</fs:srcfeed><fs:itemid>feedsky/LiYue_tech/~8013450/411577568/6122425</fs:itemid></item><item><title>数据泵导入导出数据</title><link>http://www.liyue.org/tech/archives/192</link><wfw:commentRss>http://www.liyue.org/tech/archives/192/feed</wfw:commentRss><slash:comments>0</slash:comments><description>数据导入，首先需要知道导入端oracle的dpump_dir目录，通过执行下面的语句查看系统表： SELECT * FROM dba_directories 得到DPUMP_DIR路径为：/var/web/exp_bak/pumpdata 将备份的dmp文件放到这个路径下，执行： ./impdp user/pass dumpfile=Oracle_bak_20091130.dmp directory=dpump_dir dmp文件必须要放到dpump_dir目录下，并且dumpfile 不能带路径，否则，出现下面类似错误： UDI-00008: operation generated ORACLE error 1034 ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux-x86_64 Error: 2: No such file or directory UDI-00003: all allowable logon attempts failed 用oracle帐户登陆系统后，执行cat ~/.bash_profile，查看oracle帐户的环境变量。 如果用su oracle，则oracle环境变量不会执行，可以运行source ~/.bash_profile 执行环境变量配置文件而不必重新用oracle帐户登陆。&lt;img src=&quot;http://www1.feedsky.com/t1/411577569/LiYue_tech/feedsky/s.gif?r=http://www.liyue.org/tech/archives/192&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/LiYue_tech/411577569/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/LiYue_tech/411577569/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>expdp</category><category>impdp</category><category>oracle</category><pubDate>Mon, 30 Nov 2009 20:21:53 +0800</pubDate><author>李悦</author><comments>http://www.liyue.org/tech/archives/192#comments</comments><guid isPermaLink="false">http://www.liyue.org/tech/?p=192</guid><dc:creator>李悦</dc:creator><fs:srclink>http://www.liyue.org/tech/archives/192</fs:srclink><fs:srcfeed>http://www.liyue.org/tech/feed</fs:srcfeed><fs:itemid>feedsky/LiYue_tech/~8013450/411577569/6122425</fs:itemid></item><item><title>系统备份之定期清理日志文件</title><link>http://www.liyue.org/tech/archives/186</link><wfw:commentRss>http://www.liyue.org/tech/archives/186/feed</wfw:commentRss><slash:comments>0</slash:comments><description>一、前言 　　系统备份会定期产生备份文件，日积月累，早期的备份应该删除。设定每周清理一下备份文件，只保留最近7天的数据。可以根据文件的时间检索并删除。适用于系统管理中的数据备份文件和日志文件的管理。 二、SHELL脚本 find /var/web/apache/logs -type f -ctime +7 -exec rm {} \; 这个脚本会将指定目录及其子目录的所有符合条件的文件删除，没有提示。 三、加入计划任务 将上述命令写入一shell脚本back.sh 赋予可执行权限chmod 755 back.sh 编辑计划任务： #crontab -u user -e 0 2 * * 0 /home/back.sh back.sh脚本会在每周日凌晨２点执行。 有关crontab的详细命令参见相关资料，有很多。 这里只简要说明下，计划任务前５位用数字表示依次是： 分：（０——５９） 小时：（１——２３） 日：（１——３１） 月：（１——１２） 星期：（０——６，０为星期日）&lt;img src=&quot;http://www1.feedsky.com/t1/411577570/LiYue_tech/feedsky/s.gif?r=http://www.liyue.org/tech/archives/186&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/LiYue_tech/411577570/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/LiYue_tech/411577570/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>linux</category><pubDate>Fri, 06 Nov 2009 17:21:16 +0800</pubDate><author>李悦</author><comments>http://www.liyue.org/tech/archives/186#comments</comments><guid isPermaLink="false">http://www.liyue.org/tech/?p=186</guid><dc:creator>李悦</dc:creator><fs:srclink>http://www.liyue.org/tech/archives/186</fs:srclink><fs:srcfeed>http://www.liyue.org/tech/feed</fs:srcfeed><fs:itemid>feedsky/LiYue_tech/~8013450/411577570/6122425</fs:itemid></item><item><title>Apache配置支持SHTML</title><link>http://www.liyue.org/tech/archives/180</link><wfw:commentRss>http://www.liyue.org/tech/archives/180/feed</wfw:commentRss><slash:comments>0</slash:comments><description>一、前言 CMS中模板用置标嵌套头尾模板的方法，方便快捷，但是存在弊端，当文档数据量庞大时，只要嵌套的头尾模板稍有改动，就得完全发布站点才能更新所有的文档模板。数据量有几十万条，这个就是噩梦。使用SSI技术，将头尾作为独立文件嵌入到页面中，只要更新发布头尾文件就可以了。 二、Apache配置 Apache默认是不支持SSI的，更改httpd.conf来进行配置。 搜索“AddType text/html .shtml”，找到下面两行： # AddType text/html .shtml # AddOutputFilter INCLUDES .shtml 将这两行前面的#注释去掉。 搜索下面的默认页配置： DirectoryIndex index.html index.htm 将index.shtml放到第一个位置 DirectoryIndex index.shtml index.html index.htm 接下来修改虚拟主机配置来支持shtml 例如下面的虚拟主机配置： &amp;#60;VirtualHost *:80&amp;#62; ServerAdmin webmaster@cas.cn &amp;#60;Directory &amp;#34;/var/web/casweb/cas&amp;#34;&amp;#62; Options -Indexes FollowSymLinks Includes Order allow,deny Allow from all &amp;#60;/Directory&amp;#62; DocumentRoot /var/web/casweb/cas/ ServerName www.cas.cn ErrorLog logs/www.cas.cn-error_log TransferLog &amp;#34;&amp;#124;/usr/local/sbin/cronolog /usr/local/apache2/logs/www.cas.cn-%Y%m%d-access_log&amp;#34; &amp;#60;/VirtualHost&amp;#62; 蓝色的Includes是在原来的基础上增加的。 三、SSI页面调用方法 [...]&lt;img src=&quot;http://www1.feedsky.com/t1/411577571/LiYue_tech/feedsky/s.gif?r=http://www.liyue.org/tech/archives/180&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/LiYue_tech/411577571/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/LiYue_tech/411577571/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>apache</category><category>web优化</category><pubDate>Sat, 24 Oct 2009 10:37:36 +0800</pubDate><author>李悦</author><comments>http://www.liyue.org/tech/archives/180#comments</comments><guid isPermaLink="false">http://www.liyue.org/tech/?p=180</guid><dc:creator>李悦</dc:creator><fs:srclink>http://www.liyue.org/tech/archives/180</fs:srclink><fs:srcfeed>http://www.liyue.org/tech/feed</fs:srcfeed><fs:itemid>feedsky/LiYue_tech/~8013450/411577571/6122425</fs:itemid></item><item><title>PageNavi插件的应用</title><link>http://www.liyue.org/tech/archives/178</link><wfw:commentRss>http://www.liyue.org/tech/archives/178/feed</wfw:commentRss><slash:comments>0</slash:comments><description>　　wordpress的一些主题，对常用插件的支持不尽相同，当不支持你所希望的插件时，就需要手动添加对该插件的支持。以PageNavi插件为例，作为必装的插件，更好的实现文章列表的分页导航，取代系统默认的Previous Entries、Next Entries 。 　　安装并激活Wp-PageNavi插件。打开主题的index文件，找到例如下面的一段：系统默认的翻页代码： &amp;#60;div class=&amp;#34;alignleft&amp;#34;&amp;#62; &amp;#60;?php next_posts_link&amp;#40;'&amp;#38;larr; Previous Entries'&amp;#41; ?&amp;#62; &amp;#60;/div&amp;#62; &amp;#60;div class=&amp;#34;alignright&amp;#34;&amp;#62; &amp;#60;?php previous_posts_link&amp;#40;'Next Entries &amp;#38;rarr;'&amp;#41; ?&amp;#62; &amp;#60;/div&amp;#62; 只需要在这代码的外围加上对PageNavi插件的判断、应用： &amp;#60;?php if&amp;#40;function_exists&amp;#40;'wp_pagenavi'&amp;#41;&amp;#41;&amp;#123; wp_pagenavi&amp;#40;&amp;#41;; &amp;#125; else &amp;#123; ?&amp;#62; &amp;#160; &amp;#60;div class=&amp;#34;alignleft&amp;#34;&amp;#62; &amp;#60;?php next_posts_link&amp;#40;'&amp;#38;larr; Previous Entries'&amp;#41; ?&amp;#62; &amp;#60;/div&amp;#62; &amp;#60;div class=&amp;#34;alignright&amp;#34;&amp;#62; &amp;#60;?php previous_posts_link&amp;#40;'Next Entries &amp;#38;rarr;'&amp;#41; ?&amp;#62; &amp;#60;/div&amp;#62; &amp;#160; &amp;#60;?php &amp;#125; ?&amp;#62; 　　判断wp_pagenavi插件是否激活存在，是就应用 wp_pagenavi();否则，还用系统默认方式。 对其它插件的支持，基本上也是按照这种方式应用的。&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/LiYue_tech/411577572/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/LiYue_tech/411577572/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>wordpress</category><pubDate>Wed, 29 Apr 2009 11:29:48 +0800</pubDate><author>李悦</author><comments>http://www.liyue.org/tech/archives/178#comments</comments><guid isPermaLink="false">http://www.liyue.org/tech/?p=178</guid><dc:creator>李悦</dc:creator><fs:srclink>http://www.liyue.org/tech/archives/178</fs:srclink><fs:srcfeed>http://www.liyue.org/tech/feed</fs:srcfeed><fs:itemid>feedsky/LiYue_tech/~8013450/411577572/6122425</fs:itemid></item><item><title>数据复活</title><link>http://www.liyue.org/tech/archives/167</link><wfw:commentRss>http://www.liyue.org/tech/archives/167/feed</wfw:commentRss><slash:comments>0</slash:comments><description>　　某个系统管理员一不小心直接用数据库管理工具把一文章表的标题字段类型改了，导致所有文章标题不能正常显示了。上万条的数据有点懵了。之前数据库也没有备份过。试图修复数据库也没有成功。唯一的希望寄托在数据库本身的结构上。 　　由于文章的部分信息在另外一个表中也有所体现，标题信息正在其中。只要将这部分信息重写回表中就可以恢复。两个表是通过ID相关联的。检索出文章对应的标题并写回原表。但是原表文章范围大于另一个表，只要少量信息不存在。能恢复大部分信息就好了。 &amp;#60;?php $DB_Server = &amp;#34;localhost&amp;#34;; $DB_Username = &amp;#34;root&amp;#34;; $DB_Password = &amp;#34;password&amp;#34;; $DB_DBName = &amp;#34;dbname&amp;#34;; //$DB_TBLName = &amp;#34;column_article&amp;#34;; $Connect = @mysql_connect&amp;#40;$DB_Server, $DB_Username, $DB_Password&amp;#41; or die&amp;#40;&amp;#34;Couldn't connect.&amp;#34;&amp;#41;; $Db = @mysql_select_db&amp;#40;$DB_DBName, $Connect&amp;#41; or die&amp;#40;&amp;#34;Couldn't select database.&amp;#34;&amp;#41;; &amp;#160; $sql = &amp;#34;Select column_article.title,column_article.articleid,article.title,article.id from column_article,article where column_article.articleid=article.id&amp;#34;; $ALT_Db = @mysql_select_db&amp;#40;$DB_DBName, $Connect&amp;#41; or die&amp;#40;&amp;#34;Couldn't select database&amp;#34;&amp;#41;; &amp;#160; $result = @mysql_query&amp;#40;$sql,$Connect&amp;#41; [...]&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/LiYue_tech/411577573/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/LiYue_tech/411577573/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>系统</category><category>php</category><category>mysql</category><pubDate>Fri, 10 Apr 2009 12:59:01 +0800</pubDate><author>李悦</author><comments>http://www.liyue.org/tech/archives/167#comments</comments><guid isPermaLink="false">http://www.liyue.org/tech/?p=167</guid><dc:creator>李悦</dc:creator><fs:srclink>http://www.liyue.org/tech/archives/167</fs:srclink><fs:srcfeed>http://www.liyue.org/tech/feed</fs:srcfeed><fs:itemid>feedsky/LiYue_tech/~8013450/411577573/6122425</fs:itemid></item><item><title>umask来设定创建文件的默认权限</title><link>http://www.liyue.org/tech/archives/164</link><wfw:commentRss>http://www.liyue.org/tech/archives/164/feed</wfw:commentRss><slash:comments>0</slash:comments><description>　　linux下用户创建文件、文件夹都会有一个默认权限，系统默认文件夹权限是755，文件权限是644这个默认权限是可以设定的，就是通过umask，通过在shell下运行umask命令来看看当前的umask数值是多少，例如文件夹默认权限是755，他的umask数值为022。 　　这个数值表示的是什么意思，又如何来计算出想要的umask值。umask是在下面的配置文件中设定/etc/profile（全局设置），$ [HOME]/.bash_profile或者$ [HOME]/.profile（当前用户的设置，操作系统版本不同，文件名会不同）。在配置文件中加入一行umask 022即可。 　　umask值的计算方法，是通过权限的补码得来。例如文件夹权限755，文件夹的umask各位数值最大可以到7，各位数的补码就是022；而文件权限最大只能到6，因为系统不允许新建文件拥有执行权限。 　　umask值与文件、目录权限对照表： umask　文件　目录 —————————— 0 　　　6 　　　7 1 　　　6　　　 6 2 　　　4 　　　5 3　　　 4 　　　4 4　　　 2　　　 3 5 　　　2　　　 2 6 　　　0　　　 1 7 　　　0　　　 0&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/LiYue_tech/411577574/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/LiYue_tech/411577574/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>linux</category><category>shell</category><pubDate>Wed, 25 Feb 2009 11:25:28 +0800</pubDate><author>李悦</author><comments>http://www.liyue.org/tech/archives/164#comments</comments><guid isPermaLink="false">http://www.liyue.org/tech/?p=164</guid><dc:creator>李悦</dc:creator><fs:srclink>http://www.liyue.org/tech/archives/164</fs:srclink><fs:srcfeed>http://www.liyue.org/tech/feed</fs:srcfeed><fs:itemid>feedsky/LiYue_tech/~8013450/411577574/6122425</fs:itemid></item></channel></rss>
