Xojo 2021r2.1; a web app on linux does not show any WebListBox items (tried many browsers). if I run the web app it as another user, it does. How is this possible?
I addded debug just before the line that does AddRow to the WebListBox, and it prints out the data that is supposed be in the listbox. But in browser there is nothing.
As an update: unless the webapp is run as sudo, no buttons or controls work on it.
run the webapp as sudo or other user, it works. how?
it is a standalone app, no apaches or anything else there. Th app loads, reads config from a file, connects to mysql and so on. even retrieves items from database that are supposed to be loaded into a weblistbox. Only there is nothing in that listbox when the page is opened in a browser. I even have a label that shows how many items are supposed ti be in that list (row count of db query). It’s correct, but no items
Do you create some file at runtime? Any possibility that it has created a file once under sudo that later a regular user can’t have the proper access?
Nope, doesn’t create any files. I tried to run it as a “service” in supervisor, so it ran as “supervisord” user. it worked. try from console as any other user - not working.
did you make sure the executable is set to chmod 755 ? so that others can execute too. It could be most likely be a permissions issue as @Greg_O_Lone suggests here.
The execution permission is not the issue, it executes.
However UI elements in the web page of this app are broken depending which user runs it. Sometimes it works when run by non-admin user, too. Why, who knows. There is nothing in logs anywhere and the app displays the web pages, but listboxes don’t display any items.
A different web app, in a different directory, on a different port fails to respond to HandleURL, unless run as sudo.
Is there some files it wants to create or access somewhere, even for a HandleURL request? I swear i gave all permissions to files in the entire directory where the web app is, but unless its run as sudo it glitches.
You’ll certainly need access to the temp directory for that (whatever SpecialFolder.Temporary points to). However I wouldn’t expect the app to work at all out it didn’t. That said most requests up to 256K are handled completely in memory so unless you’re posting huge amounts of data, I wouldn’t have spect you to run into that.