我想用Raspian Buster写一个文件。使用Raspian Stretch (它依赖于Debian 9),它可以正常工作,没有任何问题。同样的代码在Raspian Buster (Debian 10)上不起作用。
File myFile = new File("/media/usb/test.properties");
boolean success = myFile.createNewFile();即使目录具有权限777oktal,当尝试写入文件时,也始终会发生以下异常:
java.io.IOException: Das Dateisystem ist nur lesbar (my translation: the file system is readable only)当我第一次在目录中手动创建指定的文件,并使用Java代码检查权限时,它输出以下结果:
File f = new File("/media/usb/test.properties");
f.exists(): true
f.canRead(): true
f.canWrite(): falseRaspian Stretch和Buster之间发生了什么变化?我做错了什么?
谢谢你的帮助!
发布于 2020-04-09 15:47:04
根据https://github.com/eclipse/jetty.project/issues/3579解决的问题
现在可以正常工作了!
https://stackoverflow.com/questions/61043971
复制相似问题