- - PR -
一般ユーザーでもeclipseまたはmySQLを使えるようにしたい
1
| 投稿者 | 投稿内容 | ||||
|---|---|---|---|---|---|
|
投稿日時: 2004-09-10 14:05
こんにちは。vine3.0, jdk1.4.2_05, eclipse2.1.3, mysql4.1を使っています。
rootでvineにログインし、eclipseやmysqlを実行しても何の問題もなく利用できるのですが、一般ユーザーで使用しようとするとアプリケーションが起動しません。パーミッションの問題なのかと素人なりに思っているのですが、jdk、eclipse、mysqlともにディレクトリのパーミッションは755です。755ではダメなのですか? ☆eclipseのエラー An exception occurred while writing to the platform log: java.io.FileNotFoundException: /usr/eclipse/eclipse/workspace/.metadata/.log (Permission denied) at java.io.FileOutputStream.openAppend(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:177) at java.io.FileOutputStream.<init>(FileOutputStream.java:102) at org.eclipse.core.launcher.Main.openLogFile(Main.java:1400) at org.eclipse.core.launcher.Main.log(Main.java:1261) at org.eclipse.core.launcher.Main.main(Main.java:587) Logging to the console instead. !ENTRY org.eclipse.core.launcher 4 0 9 10, 2004 13:42:20.929 !MESSAGE Exception launching the Eclipse Platform: An exception occurred while writing to the platform log: java.io.FileNotFoundException: /usr/eclipse/eclipse/workspace/.metadata/.log (Permission denied) at java.io.FileOutputStream.openAppend(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:177) at java.io.FileOutputStream.<init>(FileOutputStream.java:102) at org.eclipse.core.launcher.Main.openLogFile(Main.java:1400) at org.eclipse.core.launcher.Main.log(Main.java:1261) at org.eclipse.core.launcher.Main.main(Main.java:588) Logging to the console instead. !STACK java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.internal.boot.InternalBootLoader.startup(InternalBootLoader.java:1040) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:838) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) ... 7 more Caused by: org.eclipse.core.runtime.CoreException: The platform metadata area could not be written: /usr/eclipse/eclipse/workspace/.metadata. By default the platform writes its content under the current working directory when the platform is launched. Use the -data parameter to specify a different content area for the platform. at org.eclipse.core.internal.runtime.PlatformMetaArea.createLocation(PlatformMetaArea.java:73) at org.eclipse.core.internal.runtime.InternalPlatform.setupMetaArea(InternalPlatform.java:1053) at org.eclipse.core.internal.runtime.InternalPlatform.loaderStartup(InternalPlatform.java:679) ... 14 more Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Error: Can't open display: :0.0 ☆mysqlのエラー(/usr/local/mysql/bin/mysqld_safe &) Starting mysqld daemon with databases from /usr/local/mysql/var /usr/local/mysql/bin/mysqld_safe: line 302: /usr/local/mysql/var/localhost.localdomain.err: 許可がありません rm: リンク `/tmp/mysql.sock' を削除できません: 許可されていない操作です rm: ``/usr/local/mysql/var/localhost.localdomain.pid'' を削除できません: 許可が ありません /usr/local/mysql/bin/mysqld_safe: line 308: /usr/local/mysql/var/localhost.localdomain.err: 許可がありません tee: /usr/local/mysql/var/localhost.localdomain.err: 許可がありません 040910 14:00:41 mysqld ended tee: /usr/local/mysql/var/localhost.localdomain.err: 許可がありません | ||||
|
投稿日時: 2004-09-10 15:42
eclipse のエラーの最初に出ていますが、ディレクトリ内を更新する権限がなくファイルが作成できないようですね。
一例ですが、eclipseUser のようなグループを作って eclipse を使うユーザはそのグループに属するようにし、workspace 以下のディレクトリを eclipseUser に chgrp して、パーミッションも 775 にすれば良いと思います。 mySQL もファイルの作成・削除に失敗しているように見えるので、ユーザグループの新設とユーザ登録、オーナーグループの変更とグループパーミッション設定でいけると思います。 jdk は参照権限があれば問題ない気がします。 | ||||
|
投稿日時: 2004-09-12 01:18
だめです。
755ではroot(ディレクトリの所有者)以外の人の書き込み権限がありませんよね? 757とか777とか766などでは大丈夫だと思いますが。 | ||||
|
投稿日時: 2004-09-12 14:05
777とかはやめておいたほうが無難だと思いますが…。 セキュリティ上何か有ったときに洒落にならないと思いますし。 個人的にはGioさんが提案されたグループ作成が良いと思います。 | ||||
|
投稿日時: 2004-09-13 09:04
皆さんご返答ありがとうございます。いろいろなやり方があるのですね。信頼できるみんなで使うのであれば777でも良くて、セキュリティに気をつけるのであればグループ分けして775ということですよね。グループ分けの方法でやってみて、問題なく動作しましたので、この方法でやってみます。ありがとうございました。
| ||||
|
投稿日時: 2004-09-13 10:11
eclipse のほうですが、-data オプションでワークスペースの場所を指定できるので、
ワークスペースをホームディレクトリに作る、ってのはいかがですか? $ mkdir ~/workspace $ eclipse -data ~/workspace | ||||
|
投稿日時: 2004-09-13 10:20
私もこれが正しいと思います。 そもそもインストールディレクトリにワークスペースを作ろうとするeclipseのデフォルト挙動が問題ありですね。 今時はUNIX系のOSでも「俺のマシン、俺だけ使う、俺root」なことが多いから、マルチユーザ環境での基本的作法というか習慣というかが薄れつつある気がしますなぁ。 | ||||
|
投稿日時: 2004-09-13 11:21
うっ いくらグループ内ユーザでアクセス可能にしても、各ユーザが作成したプロジェクトが他のユーザに丸見え、しかもファイルのパーミッション次第では他のユーザがファイルを更新できてしまうという問題があります。 やはりユーザ別にワークスペースを分離する方が良い解だと思います(_ _) | ||||
1
