SBT throws java.io.FileNotFoundException: (Permission denied) in the project folder

I am wondering if anyone has any experience with java.io.FileNotFoundExceptiontrying to start SBT.

When I try to start SBT, I get the error below. This happens immediately after input sbtwhen trying to load a project definition.

I checked the files, which, according to him, cannot be accessed, and they definitely exist, and I am completely fixated on why he does it.

The stack trace is as follows:

[debug] Running task... Cancelable: false, check cycles: false
java.io.FileNotFoundException: /home/blah/blah/project/target/streams/$global/compilers/$global/out (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:165)
    at sbt.std.Streams$$anon$3$$anon$2$$anonfun$text$1.apply(Streams.scala:80)
    at sbt.std.Streams$$anon$3$$anon$2$$anonfun$text$1.apply(Streams.scala:80)
    at sbt.std.Streams$$anon$3$$anon$2.make(Streams.scala:91)
    at sbt.std.Streams$$anon$3$$anon$2.text(Streams.scala:80)
    at sbt.std.Streams$$anon$3$$anon$2.log(Streams.scala:85)
    at sbt.std.TaskStreams$class.log(Streams.scala:31)
    at sbt.std.Streams$$anon$3$$anon$2.log(Streams.scala:69)
    at sbt.EvaluateTask$$anonfun$logIncomplete$2.log$1(EvaluateTask.scala:95)
    at sbt.EvaluateTask$$anonfun$logIncomplete$2.apply(EvaluateTask.scala:99)
    at sbt.EvaluateTask$$anonfun$logIncomplete$2.apply(EvaluateTask.scala:94)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at sbt.EvaluateTask$.logIncomplete(EvaluateTask.scala:94)
    at sbt.EvaluateTask$.logIncResult(EvaluateTask.scala:86)
    at sbt.EvaluateTask$.run$1(EvaluateTask.scala:149)
    at sbt.EvaluateTask$.runTask(EvaluateTask.scala:160)
    at sbt.EvaluateTask$$anonfun$apply$1$$anonfun$apply$3.apply(EvaluateTask.scala:84)
    at sbt.EvaluateTask$$anonfun$apply$1$$anonfun$apply$3.apply(EvaluateTask.scala:83)
    at scala.Option.map(Option.scala:133)
    at sbt.EvaluateTask$$anonfun$apply$1.apply(EvaluateTask.scala:83)
    at sbt.EvaluateTask$$anonfun$apply$1.apply(EvaluateTask.scala:82)
    at sbt.EvaluateTask$.withStreams(EvaluateTask.scala:120)
    at sbt.EvaluateTask$.apply(EvaluateTask.scala:82)
    at sbt.EvaluateTask$.evalPluginDef(EvaluateTask.scala:69)
    at sbt.Load$$anonfun$2.apply(Load.scala:51)
    at sbt.Load$$anonfun$2.apply(Load.scala:51)
    at sbt.Load$.buildPluginDefinition(Load.scala:496)
    at sbt.Load$.buildPlugins(Load.scala:477)
    at sbt.Load$.plugins(Load.scala:465)
    at sbt.Load$.loadUnitNew(Load.scala:419)
    at sbt.Load$.loadUnit(Load.scala:410)
    at sbt.Load$$anonfun$13$$anonfun$apply$11.apply(Load.scala:252)
    at sbt.Load$$anonfun$13$$anonfun$apply$11.apply(Load.scala:252)
    at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:94)
    at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:93)
    at sbt.BuildLoader.apply(BuildLoader.scala:137)
    at sbt.Load$.loadAll(Load.scala:307)
    at sbt.Load$.loadURI(Load.scala:260)
    at sbt.Load$.load(Load.scala:256)
    at sbt.Load$.load(Load.scala:247)
    at sbt.Load$.apply(Load.scala:124)
    at sbt.Load$.defaultLoad(Load.scala:39)
    at sbt.BuiltinCommands$.doLoadProject(Main.scala:400)
    at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:394)
    at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:394)
    at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)
    at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)
    at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
    at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
    at sbt.Command$.process(Command.scala:90)
    at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
    at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
    at sbt.State$$anon$2.process(State.scala:170)
    at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
    at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.MainLoop$.next(MainLoop.scala:71)
    at sbt.MainLoop$.run(MainLoop.scala:64)
    at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:53)
    at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:50)
    at sbt.Using.apply(Using.scala:25)
    at sbt.MainLoop$.runWithNewLog(MainLoop.scala:50)
    at sbt.MainLoop$.runAndClearLast(MainLoop.scala:33)
    at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:17)
    at sbt.MainLoop$.runLogged(MainLoop.scala:13)
    at sbt.xMain.run(Main.scala:26)
    at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
    at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
    at xsbt.boot.Launch$.run(Launch.scala:57)
    at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
    at xsbt.boot.Launch$.launch(Launch.scala:65)
    at xsbt.boot.Launch$.apply(Launch.scala:16)
    at xsbt.boot.Boot$.runImpl(Boot.scala:32)
    at xsbt.boot.Boot$.main(Boot.scala:21)
    at xsbt.boot.Boot.main(Boot.scala)
+3
source share
2 answers

The error (Permission denied)indicates that you are probably using a command sbtfrom a user who does not have permission for the project you are entering sbt.

chown -R youruser:youruser /path/to/project, .

+3

, sbt root, root (, ). sudo rm -rf target/, sbt clean compile, . .

+1

All Articles