如题,由于要学习hadoop,所以我在我的ubuntu里新建了一个用户user2专门用于安装hadoop环境,原来的用户是user1,原来user1用户已经安装了eclipse,所以我想在user2用户登录后,能够直接使用uesr1用户安装的eclipse,而不用重新安装了。实现方法就是使用user2用户身份登录系统后,进入user1用户安装eclipse的目录,我的目录是/home/m/.java/eclipse,在这里有一个文件夹叫configuration,我们只需将这个文件夹的权限修改为777即可实现共享。
chmod 777configuration/
这样,user2就可以使用eclipse了。
但是,当我再次使用user1身份登录后,打开eclipse时,出现了错误:
Locking is not possible in the directory "/home/m/.java/eclipse/configuration/org.eclipse.osgi". A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable
file locking passing "-Dosgi.locking=none" as a VM argument.
/home/m/.java/eclipse/configuration/org.eclipse.osgi/.manager/.fileTableLock (\u6743\Uffffffff
在网上搜索了一下这个问题,找到的是:
Cause
The error occurs when the user does not have the required permission to access the.fileTableLock
file. This file is in the configuration directory for Installation Manager.
The permission is not available because the umask settings for the previous user who ran Installation Manager were not set for group mode. The umask settings for the previous user did not allow files created in group mode to have group permissions equal to
owner permissions.
The configuration folder is used to store OSGi cache information. The.fileTableLock
file is accessed by the OSGi cache at runtime. Failing to access the.fileTableLock
file
can impact OSGi cache internal logic.
大意是因为user2使用了eclipse之后,user1就不再拥有操作“文件表锁文件”的权限了,需要重新设置权限。解决方法如下:
Resolving the problem
To resolve this issue, take one of the following steps:
-
Change the permission for
.fileTableLock
file to777
-
There are several directories that have .fileTableLock files that might require a change of permissions:
-
{IM_HOME}/eclipse/configuration/org.eclipse.core.runtime/.manager
-
{IM_HOME}/eclipse/configuration/org.eclipse.equinox.app/.manager
-
{IM_HOME}/eclipse/configuration/org.eclipse.osgi/.manager
-
Run this command on the configuration directory:
chmod -R g+rwx
-
As a root user, change the owning group for the contents of the root directory of the Eclipse configuration directory to the group that uses Installation Manager in group mode:
chgrp -R <groupName> <{IM_HOME}/eclipse/configuration>
我首先将那三个文件的权限修改为777,命令如下:
cd org.eclipse.osgi/.manager/
sudo chmod 777 .*
cd org.eclipse.equinox.app/.manager/
sudo chmod 777 .*
cd org.eclipse.core.runtime/.manager/
sudo chmod 777 .*
然后在configuration这个目录里,我运行:
chmod -R g+rwx *.*
-R的意思是遇到文件夹时递归更改。
这时,我在次打开eclipse,原来的错误没有了,但是又出现了,workspace这个目录无法访问的错误,
原因是我用user2登录后使用eclipse时把默认工程目录给改了,user1和user2两个用户使用的工程目录是不一样的,如何才能每次打开eclipse时都提示选择workspace呢?
方法如下:
勾选图中的选项,这样每次打开eclipse时,都会提示你选择工作目录了。方便两个不同的用户使用自己的工程目录。
OK,希望对大家有所帮助!
分享到:
相关推荐
讲述在虚拟机中的LINXU怎样和本机通信,同时在LINUX中安装eclipse。
Linux下eclipse的安装.pdf
在LINUX下安装Eclipse的方法 经典安装
在linux下安装eclipse以及运行c++程序的安装步骤
刚接触Linux的同学们一定对于如何在Linux下编程充满好奇,Eclipse是一种很有利很方便的工具哦
阐述在linux下安装Eclipse的详细过程,我自己整理的,简单实用
在ubuntu_linux下安装eclipse以及运行c++程序的安装步骤
在Linux上安装jre,jdk,Eclipse的傻瓜式手册。 安装环境为红帽子企业版5。 备注:下载后评一下分,下载用掉的10分就回到你的账户上了。
在linux下安装配置eclipse(redhat 9.0)
linux eclipse linux eclipse linux eclipse linux eclipse linux eclipse linux eclipse linux eclipse linux eclipse linux eclipse linux eclipse linux eclipse linux eclipse
linux下安装Eclipse及安装c++插件CDT linux下安装Eclipse及安装c++插件CDT linux下安装Eclipse及安装c++插件CDT
有关于 linux 系统下安装 Eclipse 的的详细过程
linux 32位 Eclipse Mars开发工具
Linux系统环境下的Eclipse开发工具的安装包、直接安装即可!完美可行
jdk,Eclipse,MySQL在linux下的安装手册
使用Eclipse的平台共享代码使用Eclipse的平台共享代码使用Eclipse的平台共享代码使用Eclipse的平台共享代码使用Eclipse的平台共享代码
eclipse如何在linux环境上安装
在Linux下安装openCV 并将其整合到Eclipse当中
使用eclipse开发嵌入式linux,英文版
eclipse linux32安装包