use, require, print, open, eval are among the commands restricted from
within the Safe compartment. Basically all attempts to write to the
disk directly are restricted from within all macro files (the .pl
files) and the problems themselves (.pg).
Direct access to the disk raises the possibility of all kinds of
exploit opportunities and we prevent it except through specific access
methods that have been written for WeBWorK.
The contents of the library modules (.pm) are not executed from within
the Safe compartment. This is where many of the restricted IO
operations have been placed, as well as in the file dangerousmacros.pl
You can write these yourself and load them by including them in the
list in global.conf. You should think carefully however about whether
the disk access has been sufficiently restricted to prevent accidental
destruction when called from a .pg problem.
floor and ceil are defined in PGauxiliaryFunctions -- although I'd be
curious to know whether they conform to POSIX standards.
I'm curious what you are building that uses disk access. We may be able
to help you out with the construction of the appropriate library
<| Post or View Comments |>