New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insecure temporary directory name #111

Closed
sebek64 opened this Issue Jan 6, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@sebek64

sebek64 commented Jan 6, 2014

The plugin creates /tmp/nb-gradle-plugin/ directory. However, in multi-user environment, this directory is owned by the first user and the others cannot create files in it, leading to the exception:

Failed to load Gradle project: test
java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1006)
at org.netbeans.gradle.model.util.StringAsFileRef.tryCreateRef(StringAsFileRef.java:33)
at org.netbeans.gradle.model.util.StringAsFileRef.createRef(StringAsFileRef.java:91)
at org.netbeans.gradle.model.GenericModelFetcher.getModels(GenericModelFetcher.java:122)
at org.netbeans.gradle.project.model.NbGradle18ModelLoader.loadModels(NbGradle18ModelLoader.java:177)
at org.netbeans.gradle.project.model.GradleModelLoader.loadModelWithProgress(GradleModelLoader.java:351)
at org.netbeans.gradle.project.model.GradleModelLoader.access$200(GradleModelLoader.java:60)
at org.netbeans.gradle.project.model.GradleModelLoader$3.run(GradleModelLoader.java:176)
at org.netbeans.gradle.project.tasks.GradleDaemonManager.runNonBlockingGradleTask(GradleDaemonManager.java:24)
at org.netbeans.gradle.project.tasks.GradleDaemonManager.access$100(GradleDaemonManager.java:14)
at org.netbeans.gradle.project.tasks.GradleDaemonManager$2.run(GradleDaemonManager.java:105)
at org.netbeans.gradle.project.tasks.GradleDaemonManager$3.run(GradleDaemonManager.java:130)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)

@kelemen

This comment has been minimized.

Owner

kelemen commented Jan 6, 2014

Thank you for reporting, this should be fixed in the master branch. It would be nice if you could confirm it. If you can't, I plan to have a new release this week.

@kelemen kelemen closed this Jan 6, 2014

@sebek64

This comment has been minimized.

sebek64 commented Jan 6, 2014

Thank you for fast reply. I don't need the fix so quickly, so I'll wait for the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment