简体   繁体   English

无法删除“ tmp”,因为您没有访问权限

[英]“tmp” couldn't be removed because you don't have permission to access it

While trying to invoke simulator on macincloud server, I am getting the following error. 尝试在macincloud服务器上调用模拟器时,出现以下错误。

mac_tmp_could_not_be_removed

Steps tried by me: 我尝试的步骤:
1) Searched for "tmp" directories on my mac machine, but do not see any. 1)在我的Mac机器上搜索“ tmp”目录,但没有看到任何目录。
2) Tried to reset simulator, but after the confirmation screen (which asks whether or not to reset simulator), it throws the same error as mentioned above. 2)尝试重置模拟器,但是在确认屏幕(询问是否重置模拟器)之后,它抛出与上述相同的错误。

The permissions on the Xcode directory is as follows: Xcode目录上的权限如下:

在此处输入图片说明

From the Activity Monitor I searched for the processes related to simulator and using the logs I could figure out the location of "tmp" folder, trying to delete which simulator is throwing the error. 我从活动监视器中搜索了与模拟器相关的进程,并使用日志可以弄清楚“ tmp”文件夹的位置,试图删除哪个模拟器引发了错误。 When I am trying to remove the folder manually, I get below error: 当我尝试手动删除文件夹时,出现以下错误:

在此处输入图片说明

So which means root user is required to delete the "tmp" directory. 因此,这意味着需要root用户删除“ tmp”目录。 Since I am using a non-root user to invoke the simulator, what can I do to overcome this issue? 由于我正在使用非root用户来调用模拟器,因此我该怎么做才能克服此问题?

EDIT: I have elevated the permissions for my account recursively on my home and I have the following permissions: 编辑:我已经在我的家中递归提升了我的帐户的权限,并且我具有以下权限:

my_permissions

After changing the permissions when I try to delete contents of tmp directory I get this error: 当我尝试删除tmp目录的内容时更改权限后,出现此错误: 在此处输入图片说明

So I think there is something wrong with the permissions that I have provided on the folders/files under my home directory. 因此,我认为主目录下的文件夹/文件所提供的权限存在问题。

I am describing a solution here - basically you have to remove the defunct simulator in ~/Library/Developer/CoreSimulator/Devices and recreate it. 我在这里描述一种解决方案-基本上,您必须在~/Library/Developer/CoreSimulator/Devices删除已失效的模拟器,然后重新创建它。

The fine snapshot by Felix Krause - which I also explain how to use in this article - helps you to completely reset your simulators to a pristine state. Felix Krause提供的精美快照 -我还将在本文中解释如何使用该快照 -帮助您将模拟器完全重置为原始状态。

I have this issue in iPhone 6 Simulator (iOS 9.0). 我在iPhone 6 Simulator(iOS 9.0)中遇到此问题。 Please check whether all the simulators having this issue or particular simulator. 请检查是否所有模拟器都存在此问题或特定的模拟器。

I have re created the iPhone 6 simulator in the Xcode -> Window -> Organiser. 我已经在Xcode-> Window-> Organiser中重新创建了iPhone 6模拟器。 The newly created simulator works fine. 新创建的模拟器运行正常。

Just incase it helps others, I think I managed to get in to this state by stopping the build when stopped at a breakpoint (whilst it was paused on the breakpoint I changed my CoreData data model which may have played a part). 以防万一它对其他人有所帮助,我想我可以通过在断点处停止时停止构建来进入这种状态(虽然它在断点处暂停了,但我更改了可能起作用的CoreData数据模型)。 It's the first time it's happened to me, I just closed the simulator fully and re-run the code (obviously crashed due to the model change as I'm not merging), after it crashed it allowed me to reset the simulator so maybe it locks up during model changes? 这是我第一次发生,我只是完全关闭了模拟器并重新运行了代码(显然是由于我没有合并而导致的模型更改而崩溃了),在崩溃之后它让我重置了模拟器,所以也许在模型更改期间锁定? Just a guess though but thought I would add the steps it took me to create it as it literally just happened. 尽管只是个猜测,但我想我会添加它创建它实际上所发生的步骤。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 由于您没有权限,因此无法打开文件 - File couldn't be opened because you don't have permission 无法复制,因为您无权访问ios中的应用程序包 - couldn’t be copied because you don’t have permission to access application bundle in ios 迦太基,由于您无权访问“ Release-iphoneos”而无法复制 - carthage,couldn’t be copied because you don’t have permission to access “Release-iphoneos” 文件“MyApp”无法打开,因为您无权查看错误(Xcode 11) - The file “MyApp” couldn’t be opened because you don’t have permission to view it error (Xcode 11) 无法检索文件,错误:由于您无权查看该文件,因此无法打开该文件 - Cannot retrieve file, error: The file couldn’t be opened because you don’t have permission to view it xcode 12:无法打开文件“app name”,因为您没有查看它的权限 - xcode 12: The file “app name” couldn't be opened because you don’t have permission to view it 文件“***.app”无法打开,因为您没有查看它的权限 - The file “***.app” couldn’t be opened because you don’t have permission to view it 文件 ”<appName> .app”无法打开,因为您没有查看它的权限 - The file “<appName>.app” couldn’t be opened because you don’t have permission to view it Xcode 9.4无法打开文件“ my_app”,因为您没有查看权限 - Xcode 9.4 The file “my_app” couldn’t be opened because you don’t have permission to view it 由于您无权查看文件“ IMG_00001.MOV”,因此无法打开 - The file “IMG_00001.MOV” couldn’t be opened because you don’t have permission to view it
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM