<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>权限 &#8211; LPC影子技术分享</title>
	<atom:link href="https://www.mudbest.com/tag/%E6%9D%83%E9%99%90/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.mudbest.com</link>
	<description>行影不离,忘之却步.</description>
	<lastBuildDate>Mon, 01 Oct 2012 14:16:02 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.1</generator>
	<item>
		<title>chmod命令详细用法</title>
		<link>https://www.mudbest.com/chmod%e5%91%bd%e4%bb%a4%e8%af%a6%e7%bb%86%e7%94%a8%e6%b3%95/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 09 Jan 2011 02:33:22 +0000</pubDate>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[权限]]></category>
		<guid isPermaLink="false">http://blog.mudbest.com/?p=306</guid>

					<description><![CDATA[指令名称 : chmod 使用权限 : 所有使用者 使用方式 : chmod [-cfvR] [&#8211; ... <a title="chmod命令详细用法" class="read-more" href="https://www.mudbest.com/chmod%e5%91%bd%e4%bb%a4%e8%af%a6%e7%bb%86%e7%94%a8%e6%b3%95/" aria-label="阅读 chmod命令详细用法">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<p>指令名称 : chmod<br />
使用权限 : 所有使用者<br />
使用方式 : chmod [-cfvR] [&#8211;help] [&#8211;version] mode file&#8230;<br />
说明 : Linux/Unix 的档案调用权限分为三级 : 档案拥有者、群组、其他。利用 chmod 可以藉以控制档案如何被他人所调用。<br />
参数 :<br />
mode : 权限设定字串，格式如下 : [ugoa&#8230;][[+-=][rwxX]&#8230;][,&#8230;]，其中<br />
u 表示该档案的拥有者，g 表示与该档案的拥有者属于同一个群体(group)者，o 表示其他以外的人，a 表示这三者皆是。<span id="more-306"></span><br />
+ 表示增加权限、- 表示取消权限、= 表示唯一设定权限。<br />
r 表示可读取，w 表示可写入，x 表示可执行，X 表示只有当该档案是个子目录或者该档案已经被设定过为可执行。<br />
-c : 若该档案权限确实已经更改，才显示其更改动作<br />
-f : 若该档案权限无法被更改也不要显示错误讯息<br />
-v : 显示权限变更的详细资料<br />
-R : 对目前目录下的所有档案与子目录进行相同的权限变更(即以递回的方式逐个变更)<br />
&#8211;help : 显示辅助说明<br />
&#8211;version : 显示版本<br />
范例 :将档案 file1.txt 设为所有人皆可读取 :</p>
<pre class="brush: plain; title: ; notranslate">
chmod ugo+r file1.txt
</pre>
<p>将档案 file1.txt 设为所有人皆可读取 :</p>
<pre class="brush: plain; title: ; notranslate">
chmod a+r file1.txt 
</pre>
<p>将档案 file1.txt 与 file2.txt 设为该档案拥有者，与其所属同一个群体者可写入，但其他以外的人则不可写入 :</p>
<pre class="brush: plain; title: ; notranslate">
chmod ug+w,o-w file1.txt file2.txt 
</pre>
<p>将 ex1.py 设定为只有该档案拥有者可以执行 :</p>
<pre class="brush: plain; title: ; notranslate">
chmod u+x ex1.py 
</pre>
<p>将目前目录下的所有档案与子目录皆设为任何人可读取 :<br />
chmod -R a+r *<br />
此外chmod也可以用数字来表示权限如 chmod 777 file<br />
语法为：chmod abc file<br />
其中a,b,c各为一个数字，分别表示User、Group、及Other的权限。<br />
r=4，w=2，x=1<br />
若要rwx属性则4+2+1=7；<br />
若要rw-属性则4+2=6；<br />
若要r-x属性则4+1=7。<br />
范例：</p>
<pre class="brush: plain; title: ; notranslate">
chmod a=rwx file 
</pre>
<p>和</p>
<pre class="brush: plain; title: ; notranslate">
chmod 777 file 
</pre>
<p>效果相同</p>
<pre class="brush: plain; title: ; notranslate">
chmod ug=rwx,o=x file 
</pre>
<p>和</p>
<pre class="brush: plain; title: ; notranslate">
chmod 771 file 
</pre>
<p>效果相同<br />
若用</p>
<pre class="brush: plain; title: ; notranslate">
chmod 4755 filename</pre>
<p>可使此程序具有root的权限</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
