I am finally starting to run some test some "under-dev" ABMaterial samples and each time I re-upload the files to the Raspberry pi, using SFTP, I see that "tempjars" owned by "root" and not by "pi"... so I get a "permission denied" alert!
So when copying, at each "permission denied" alert, I just skip these files… (the 'myapp.core.min.xxxxx.css', 'myapp.xxxxx.css', 'myapp.xxxxxx.js' and 'index.html')
Is this ok?
Not using b4bridge at all... When I do, I get same kind of errors, even running it from root with sudo.
So I am just compiling in release and copying the files over using SFTP...
The usual "sudo Java -jar"
My question is not about running the jar but why some files have "root" as owner while other have "pi", which is the user logged in for SFTP
They are if in debug mode. I never "debug' run an app (I guess this is the tempjars?) but always compile it in release mode and then copy the final .jar, .needs and the whole www folder to the Pi.
By running your jar file via sudo, you are running it as root and therefore any files generated by the your application are owned by root. What do you copy to your pi? Plus the thing @alwaysbusy mentioned (he out typed me).
So when copying, at each "permission denied" alert, I just skip these files… (the 'myapp.core.min.xxxxx.css', 'myapp.xxxxx.css', 'myapp.xxxxxx.js' and 'index.html')
Looking at an older www folder, it is interesting to see that the "myapp" files listed here are owned by root. For "sub" pages, those four files are owned by the user I used to copy the folder with. What is so special about the "myapp" files that they are regenerated, but the sup-pages are not?
Hum.. I seem to have sprung an interesting discussion...
I too compile in release, at least, most of the time, but tried b4bridge and compiled in debug just to see things...
Still, even in release, those 4 files are the only ones the SFTP complains about and have indeed a different owner than any other project related file.
1) Looking at my server, it looks like these 4 files are generated by running the application on the developer box in debug mode. Once copied to the production machine, they are somehow "touched" by the application (the release version/not debug version) upon (first startup?) in such a way that changes ownership w/o changing content (99.99% sure) nor the regular access date/time display. (Hope this made sense).
2) Renaming the www folder and uploading it works for me since I'm currently in testing phase. For production, this may not work, since upload folders may also be located there and recreating the www folder would also involve recopying the uploaded files.
3) Any uploaded files are also owned by root. Technically, root should only be necessary if the ABMaterial application uses a port below 1024 (it does in my case), otherwise it should be able to run as a user.
3) Any uploaded files are also owned by root. Technically, root should only be necessary if the ABMaterial application uses a port below 1024 (it does in my case), otherwise it should be able to run as a user.
I'm using port 80, using a no-ip as redirect to my raspberry. All needed ports are open in my router. Seeding the webapp is not an issue, just "uploading/updating" the webapp