Skip to content
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

fsc creates /tmp/scala-devel folder writable only by owner (drwxr-xr-x) #4733

Closed
scabug opened this issue Jun 24, 2011 · 4 comments
Closed
Milestone

Comments

@scabug
Copy link

scabug commented Jun 24, 2011

When invoking fsc by the compilation of a script fsc creates a /tmp/scala-devel directory that is writable only by the user.
A second user is not able to compile his scripts on the same machine. She gets the error: "Could not find a directory for temporary files".

in CompileSocket.scala

/** A temporary directory to use */
val tmpDir = {
val udir = Option(Properties.userName) getOrElse "shared"
val f = (Path(Properties.tmpDir) / "scala-devel" / udir).createDirectory()

if (f.isDirectory && f.canWrite) {
  info("[Temp directory: " + f + "]")
  f
}
else fatal("Could not find a directory for temporary files")

}

adding something like:
new java.io.File(Path(Properties.tmpDir) / "scala-devel").setWritable(true,false)
would maybe help.

see also this thread:
http://scala-programming-language.1934581.n4.nabble.com/fsc-Error-when-compiling-on-a-shared-machine-td3163377.html

@scabug
Copy link
Author

scabug commented Jun 24, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4733?orig=1
Reporter: idot
Assignee: @melloc
Affected Versions: 2.9.0

@scabug
Copy link
Author

scabug commented Jun 26, 2011

idot said:
easier would be to get rid of common machine level folder and create only user specific folders.

val f = (Path(Properties.tmpDir) / "scala-devel-" + udir).createDirectory()

@scabug
Copy link
Author

scabug commented Jan 26, 2013

@scabug
Copy link
Author

scabug commented Jan 29, 2013

@melloc said:
Merge into the 2.10.x branch:

scala/scala@d4de6f4

@scabug scabug closed this as completed Jan 29, 2013
@scabug scabug added this to the 2.10.1 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant