I want to write a file in Raspian Buster. With Raspian Stretch (which relies on Debian 9) it works withount any problems. The same code does not work on Raspian Buster (Debian 10).
File myFile = new File("/media/usb/test.properties");
boolean success = myFile.createNewFile();
Even when the directory has the permissions 777 oktal, when trying to write a file always the following exception occurs:
java.io.IOException: Das Dateisystem ist nur lesbar (my translation: the file system is readable only)
When I first manually create the specified file in the directory, and I check the permissions with Java code, it prints the following results:
File f = new File("/media/usb/test.properties");
f.exists(): true
f.canRead(): true
f.canWrite(): false
What has changed between Raspian Stretch and Buster? What am I doing wrong?
Thanks for any help!
Problem resolved according to https://github.com/eclipse/jetty.project/issues/3579
Works fine now!