Hi all,
yes, this can be 2 things:
1/ for the file plugin to be able to upload files in a directory on the server-side, the user that is launching the Servoy process (either by the command line or from a service/daemon) needs write access to that directory.
Now if you don’t use the new streamFilesToServer(), streamFilesFromServer(), convertToRemoteFile() and getRemoteFolderContents() methods, you can safely ignore this error… I will have a look at making the error message be more explicit.
I don’t think it’s a good idea not to log this error at all though because you will need it if you intend to use these capabilities and forgot to set up your server accordingly.
But to fix that, you can either:
a) run the server with a user that has admin rights (as some of you did), which you can consider might not be a good idea in terms of security, or
b) you can provide a path to a folder on your server where the ACL would be set to allow write access to the service running Servoy.
To provide that path, there is a new property that you can configure in servoy.properties or in the server admin plugins page:
have a look at the property under “File Plugin”, called ‘servoy.FileServerService.defaultFolder’, simply fill it with the path of your dedicated upload folder, restart your service and it will not complain anymore.
2/ even if you have write access, there can be a case where the plugin would also output an error…
That is if you didn’t provide a default directory in the server admin plugins properties or directly in the servoy.properties file.
In that case, the plugin’s server service (FileServerPlugin), will attempt to find a default path to download and upload to.
This path is supposed to be /application_server/server/webapps/ROOT/uploads/ (it will attempt to create that last folder if it doesn’t exist already)
To find that default path, the only thing it can rely on is the path of the executable that launched Servoy (its starting folder if you prefer), by default this is /application_server/ if you launched from the command line’s bat or sh - if you launched Developer it will be /developer/ (for Win/Linux) and on Mac OS X it will be /developer/Servoy.app/Contents/MacOS/
Now launched from a service, it might well be that the starting path is different, and I will have a look at it. Maybe there is also a way to configure wrapper.conf on windows to tell the service to start the process from a certain path, on linux in init.d I believe, and on Mac OS X to set that path in the plist of the daemon.
I will have a look and see how, taking into account these platform differences I can reliably find the correct path in all cases.
But one thing is for sure, Servoy will need write access to that folder!
Hope this helps,