Images not displaying

This is Web Framework 1.0 – I have an instance where I really need to run a stand alone web application under a specific linux profile – this inherits all my database connections and tons of environment variables. (so when I SHELL OUT I can do something) I built the application and dragged in a few small pictures (icons) that I display in a WebImageView. I’m running the application as “stand alone” – If I start the application from the desired user – the app can do the work…but doesn’t display any of the images. If I start the stand alone web app as root – all the images display — but the app is non-functional. I don’t see any problem with permissions on any of the resources etc that would prevent my non-root user from accessing the files. It’s stand alone…so it should be any apache cache file or anything getting in the way. Any clues out there?

Check the permissions on the images and the resources directory. My guess is that the user running your app can’t read the images or can’t look inside the folder.

Yea, the owner and permissions are the first thing I checked… but I’ve noticed that Xojo is somewhat picky about permissions. You might think that setting this to FULL ACCESS “777” would solve some problems, but I think Xojo’s built in Stand Alone server must have some safe-guards against using writable resources. I have eventually solved my problem at least temporarily by running it as root…but activating the other users profile… I’m not 100% running as the other user…but close enough to get the environment I need. Thanks for the response.

I’m curious… are you saying that the app was running under the Apache user but you need it to have access as a different user?

If so, and assuming your server is Linux or macOS, you could set the suid bit so that when Apache runs the app, it has the permissions of that user.

The other way to do this would be to run as a service because then you can specify the user and group in the config file.

Not running as Apache. I was running the app as Stand Alone not CGI. Like Apache, the user that starts the process is usually root and runs automatically on boot etc. While root itself has the highest level of privilege, it generally doesn’t have a “user like environment”. As Apache is also not a “real” user on Linux systems, things like a tty for stdin / stdout may not exist. When I have used CGI apps, I have used the setups to allow the app to run certain scripts with elevated privileges and or ignore the missing tty.