<?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>::旅程:: &#187; Mac OSX</title>
	<atom:link href="http://lipeng.de/blog/tag/mac-osx/feed/" rel="self" type="application/rss+xml" />
	<link>http://lipeng.de/blog</link>
	<description>My Endless Journey, now in Tübingen</description>
	<lastBuildDate>Wed, 13 Jul 2011 11:05:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>解决 Snow Leopard 的 everybody 权限问题</title>
		<link>http://lipeng.de/blog/apple/842/</link>
		<comments>http://lipeng.de/blog/apple/842/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 21:05:52 +0000</pubDate>
		<dc:creator>loewez</dc:creator>
				<category><![CDATA[Apple& more...]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://lipeng.de/blog/?p=842</guid>
		<description><![CDATA[可能是一直选择直接升级覆盖安装的关系，自从10.5 Apple 引入 ACL 以来，我的 Mac系统文件权限就没正常过几天。表现是文件权限列表里出现莫名其妙的 “unknown” ，10.6 以后又多了个叫 &#8220;everybody&#8221; 的。这些不正常的权限设置导致系统速度也一直不太正常，时常无响应或者卡一下。上次受不了的时候新建了一个用户试试，发现 Snow Leopard 系统跑的像飞一样，因此下决心彻底解决这个问题。今天在 Macosxhints 上找到了解决办法，分享一下。 老外说话比较啰嗦，解决办法直接看3b部分即可。 The solution to the everybody user being twice is easy. Run the Terminal application and for your user directory and files in it, remove the permission to outside world users. The following command solved it for me: chmod [...]]]></description>
			<content:encoded><![CDATA[<p><span id="more-842"></span><br />
可能是一直选择直接升级覆盖安装的关系，自从10.5 Apple 引入 ACL 以来，我的 Mac系统文件权限就没正常过几天。表现是文件权限列表里出现莫名其妙的 “unknown” ，10.6 以后又多了个叫 &#8220;everybody&#8221; 的。这些不正常的权限设置导致系统速度也一直不太正常，时常无响应或者卡一下。上次受不了的时候新建了一个用户试试，发现 Snow Leopard 系统跑的像飞一样，因此下决心彻底解决这个问题。今天在 <a href="http://forums.macosxhints.com/showthread.php?t=80606" target="_blank">Macosxhints</a> 上找到了解决办法，分享一下。</p>
<p>老外说话比较啰嗦，解决办法直接看3b部分即可。</p>
<blockquote><p>The solution to the everybody user being twice is easy. Run the Terminal application and for your user directory and files in it, remove the permission to outside world users.</p>
<p>The following command solved it for me:</p>
<p>chmod -R o-rwx username<br />
chmod -R g-rwx username</p>
<p>This got rid of both the &#8220;unknown&#8221; user and the 2nd &#8220;everyone&#8221; user.</p>
<p>The reason you get this everyone problem twice, is that there are actually 2 everyones. One seems to be a &#8220;group&#8221; named everyone, and one is outside world users. Thus, you see the name everyone twice.</p>
<p>As for getting rid of the ACL nightmare, the following worked for me.</p>
<p>1. What creates the ACL problem?<br />
You can see it in action by creating a new user account (admin access), and create some dummy files in it. Try to change the names of these files, and no problem you can do so easily. Now go to up one directory level to your user folder, open a Get Info window on the new account you just made. You will see several users in the permission section, most likely &#8220;user&#8221;, &#8220;staff&#8221;, and &#8220;everyone&#8221;.</p>
<p>Now use Get Info to apply a permission change to this new user account. For example, change the permission for &#8220;everyone&#8221; to Read Only. Then select &#8220;apply to enclosed items&#8221;. Now go back to your home directory and try to change the file name of items in that account, and you will find you can&#8217;t. Do a Get info on one of the files and in the permission section it says &#8220;You have custom access&#8221;, instead of &#8220;You have read and write access&#8221;.</p>
<p>You can also easily create the problem from the Terminal window, instead of the Get Info window. For example, go to your users folder using the Terminal application, and type the following in the terminal window.</p>
<p>chmod -R =rw,+X username</p>
<p>This will force Leopard to set the read and write permissions to the usual default to your user folder and to all files/folders recursively (this is what the -R is for) in your user folder (the +X will retain any execute permissions that are currently set). After doing this you will again create the problem.</p>
<p>2. What causes the problem?<br />
Run the Terminal application (you should be in your home directory) and type:</p>
<p>ls -le</p>
<p>This will list all your files and folders in your home directory, along with the ACL extensions to the file permissions. On my machine I get under each &#8220;permission affected&#8221; files or folders the following additional information.</p>
<p>0: group:everyone deny delete</p>
<p>So this &#8220;everyone&#8221; person is not allowed to delete any files (or rename them). And this &#8220;everyone&#8221; person is a &#8220;group&#8221; that includes EVERYONE including the user as well. Thus, since &#8220;everyone&#8221; can&#8217;t change files, neither can the user. This part is confusing at first to realize what is going on since in Unix terminology normally &#8220;everyone&#8221; only refers to the outside world, and not the user himself. I believe Apple tried to use the ACL extension to prevent certain files/folder that Leopard would not want the user to rename/delete (i.e. Pictures directory), but for some reason Leopard is applying this to all files, folder, and contents of folders.</p>
<p>3. The solution the solution is simple. Remove this ACL condition for all files or folders in your home directory.</p>
<p>3a. You typically can easily do this from the user folder level in Terminal, since the affected account also has the same ACL condition applied to it. Type ls -le to see if this condition is present for the affected user folder account itself. If it is, then all you have to do is type is:</p>
<p>chmod -R -a# 0 username</p>
<p>This will remove the ACL condition (numbered 0) from the user account folder, and all files or folders in it (the -R condition causes this recursive fix of all contents of all folders).</p>
<p>3b. You may not be able to do this from the user folder level in Terminal if the user folder itself does not have this ACL condition. In this case, simply go to your home directory in Terminal, and fix to each file or folder within your home directory individually, and do this recursively to all contents of folders so you don&#8217;t have to do it for the contents of the folders in your home directory. Type ls -le, and find which files/folders are affected, and for each affected file/folder type the following to remove their ACL condition:</p>
<p>chmod -R -a# 0 file_or_folder_name</p>
<p>After doing this, if you type &#8221; ls -le &#8221; in Terminal window you will see that the ACL condition is gone from every fixed file or folder. Also, if you do a Get Info in Finder on any fixed file/folder you will see in the permission section the phrase &#8220;You can read and write&#8221;.</p>
<p>Should the permission problem be fixed this way by canceling the ACL conditions, I am not sure. But it is now fixed on my machine (not solved, but fixed) and I again have full access to all my files.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://lipeng.de/blog/apple/842/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mac OS X: 摆脱文稿文件夹里那些不请自来的客人</title>
		<link>http://lipeng.de/blog/apple/770/</link>
		<comments>http://lipeng.de/blog/apple/770/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 00:05:19 +0000</pubDate>
		<dc:creator>loewez</dc:creator>
				<category><![CDATA[Apple& more...]]></category>
		<category><![CDATA[Mac OSX]]></category>

		<guid isPermaLink="false">http://lipeng.de/blog/?p=770</guid>
		<description><![CDATA[苹果系统的一个方便之处就是系统在侧边栏提供了不同的文件夹，它们用来存放不同类型的档案，比如音乐，图片，文本等。除了在从侧边栏点击打开外，这些文件夹在任何的打开/存储文件对话框里也找得到，对平时的文件整理十分方便（当然在Mac系统上最快的方法仍然是把文件直接拖到对话窗口里去）。如果你的硬盘不那么整洁，系统还有强大的Spotlight搜索功能随时待命，类似于忘记了一年前写的日记放在硬盘哪个角落的情况从不会出现。 说完了方便之处，下面抱怨下这些目录里的一些麻烦事。苹果提供的编程规范规定应用程序应该把生成的配置文件和记录等藏在系统资源库下相应的位置，因为这些用不到的文件对用户而言应该是不可见的。 在特殊情况下，程序应该提示用户确认文件的保存地点或者提供显眼的选项让用户可以自己更改保存位置， 而不是看上哪个地方后自以为是地拍拍脑门： “噢，我觉得这个目录不错” 然后就随便生成一个又一个的新文件夹。虽然苹果上的大部分程序遵循了这个指导原则，但总有那么一些害群之马，习惯于站在程序员而不是用户的角度来考虑问题。为什么我要抱怨这么多，看看我的文稿文件夹的截图就明白了。 我绿色高亮的那些目录就是各种程序未征求同意自己塞进来的。这个文件夹本来应该放的是我的各种文档，但是现在整个目录里接近三分之一都是不速之客，更可气的是其中有些还是空的，简直是典型占着XX不XX的行为。直接删掉吧，下次打开该程序又自动生成了。挪个地方吧，下次打开程序发现配置全没了。修改整个目录的权限吧，自己打开也麻烦。隐藏它们是个好主意，但是OS X系统并没有提供方便的隐藏方法。如果安装苹果开发环境XTools后，可以使用这个隐藏命令 /Developer/Tools/SetFile -a V /Volumes/drivename/dirname 但是以后想找隐藏起来的文件夹是个问题。使用第三方程序来隐藏文件也可以，比如使用VersionTracker上的这个inVIZible小程序。但是为了这么件小事下载个程序似乎不太值得。 目前我的解决办法是移花接木。做法是在主目录下新建个文件夹，起名叫“文档”，把“文稿”里的有用内容都挪过去，把“文档”拖到侧边栏上，最后删掉侧边栏里“文稿”的快捷方式。这样在主目录下“文档”和“文稿”并存，虽然有鹊巢鸠占，但是眼不见心不烦，鸵鸟一天是一天吧。期待所有的软件作者都站在用户立场上思考问题是不现实的。]]></description>
			<content:encoded><![CDATA[<p>苹果系统的一个方便之处就是系统在侧边栏提供了不同的文件夹，它们用来存放不同类型的档案，比如音乐，图片，文本等。除了在从侧边栏点击打开外，这些文件夹在任何的打开/存储文件对话框里也找得到，对平时的文件整理十分方便（当然在Mac系统上最快的方法仍然是把文件直接拖到对话窗口里去）。如果你的硬盘不那么整洁，系统还有强大的Spotlight搜索功能随时待命，类似于忘记了一年前写的日记放在硬盘哪个角落的情况从不会出现。</p>
<p>说完了方便之处，下面抱怨下这些目录里的一些麻烦事。<span id="more-770"></span>苹果提供的编程规范规定应用程序应该把生成的配置文件和记录等藏在系统资源库下相应的位置，因为这些用不到的文件对用户而言应该是<span style="color: #ff0000;">不可见</span>的。</p>
<p><img class="size-full wp-image-771 alignleft" style="margin-left: 5px; margin-right: 5px;" title="screenshot" src="http://lipeng.de/blog/wp-content/uploads/e59bbee78987-31.png" alt="screenshot" width="188" height="264" /></p>
<p>在特殊情况下，程序应该提示用户确认文件的保存地点或者提供显眼的选项让用户可以自己更改保存位置，</p>
<p>而不是看上哪个地方后自以为是地拍拍脑门： “噢，<span style="color: #ff0000;">我觉得</span>这个目录不错” 然后就随便生成一个又一个的新文件夹。虽然苹果上的大部分程序遵循了这个指导原则，但总有那么一些害群之马，习惯于站在程序员而不是用户的角度来考虑问题。为什么我要抱怨这么多，看看我的文稿文件夹的截图就明白了。</p>
<p>我绿色高亮的那些目录就是各种程序未征求同意自己塞进来的。这个文件夹本来应该放的是我的各种文档，但是现在整个目录里接近三分之一都是不速之客，更可气的是其中有些还是空的，简直是典型占着XX不XX的行为。直接删掉吧，下次打开该程序又自动生成了。挪个地方吧，下次打开程序发现配置全没了。修改整个目录的权限吧，自己打开也麻烦。隐藏它们是个好主意，但是OS X系统并没有提供方便的隐藏方法。如果安装苹果开发环境XTools后，可以使用这个隐藏命令</p>
<blockquote><p>/Developer/Tools/SetFile -a V /Volumes/drivename/dirname</p></blockquote>
<p>但是以后想找隐藏起来的文件夹是个问题。使用第三方程序来隐藏文件也可以，比如使用<span style="font-family: Georgia;"><a href="http://www.versiontracker.com/dyn/moreinfo/macosx/10912975">VersionTracker</a></span>上的这个<a href="http://www.versiontracker.com/dyn/moreinfo/macosx/10912975">inVIZible</a>小程序。但是为了这么件小事下载个程序似乎不太值得。</p>
<p><a href="http://lipeng.de/blog/wp-content/uploads/a1.png"><img class="alignleft size-medium wp-image-788" title="a1" src="http://lipeng.de/blog/wp-content/uploads/a1-300x249.png" alt="a1" width="300" height="249" /></a></p>
<p>目前我的解决办法是移花接木。做法是在主目录下新建个文件夹，起名叫“文档”，把“文稿”里的有用内容都挪过去，把“文档”拖到侧边栏上，最后删掉侧边栏里“文稿”的快捷方式。这样在主目录下“文档”和“文稿”并存，虽然有鹊巢鸠占，但是眼不见心不烦，鸵鸟一天是一天吧。期待所有的软件作者都站在用户立场上思考问题是不现实的。</p>
]]></content:encoded>
			<wfw:commentRss>http://lipeng.de/blog/apple/770/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

