Exporting results from the command line with no access to desktop app. Modifying Security preference 'File system access'.

Please login with a confirmed email address before reporting spam

I am trying to run a COMSOL method on my university's super computer, so I only have access to COMSOL via the command line. My method does the following:

model.study("std1").run();
model.result().export("data1").run();

And I am executing this on the command line with

comsol batch -inputfile iso_sym.mph -methodcall methodcall1

model.study("std1").run(); seems to be executing just fine. But I get the following error when running model.result().export("data1").run();:

AccessControlException: Security preference 'File system access' does not allow 'write' access to ...

So, I think I need to change Security preference 'File system access' to allow write to all files, but how do I do that from the command line?


1 Reply Last Post 25.01.2025, 15:22 GMT-5
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 days ago 25.01.2025, 15:22 GMT-5

I have not tested this suggestion myself, but I think using the following line:

security.external.filepermission=full

in the preferences file (comsol.prefs) should do the trick. You can specify where to have your customized preferences file using the command line option -prefsdir <path>.

-------------------
Henrik Sönnerlind
COMSOL
I have not tested this suggestion myself, but I think using the following line: `security.external.filepermission=full` in the preferences file (*comsol.prefs*) should do the trick. You can specify where to have your customized preferences file using the command line option `-prefsdir `.

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.