db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <edenc...@gmail.com>
Subject Re: test
Date Fri, 08 Apr 2005 02:26:27 GMT
Hi,

I did getted this post, so why didn't I get my prev?
don't know!

> OK, but this may not be much help: What owner do other files created
> by your app server process get?
> 
> It seems to me this is not in the hands of Derby - but files get
> created by whatever user is running the process that creates it...
> Hence when/if you were just using the embedded driver in a simple app,
> then the owner will be whichever user started the java process. With a
> servlet, I would think the app server is/starts the java process that
> builds the database, and thus the owner would be the owner that starts
> the app server.

You are probably right. I'm running tomcat 559 as which I started as
root. That explains why the database gets created as root.
thanks.

However that does raise a question, now that that's explained, I'd
like to know how I can create a database as another user.
-firstly it seems to me that it's a frightening security hole if my
servlet code (written by a 'mere' user) can create databases,
directories etc. as root.
-secondly would I normally create the database through use of a
servlet. This raises another question, namely: because the database is
embedded, I may find uses to create databases *on_the_fly*, maybe a
database that lasts just a session.

Don't know, what are your thoughts?

the creation of databases and tables via a servlet has a couple of
other thorny problems, namely:
it won't allow me to:
drop table bla;
create table bla;

as I might do from the ij prompt by:
run 'script.sql'

can I get a servlet to *run* a 'script.sql' file (ok I know I could
open the file with io or nio) using the database commands.

thanks for your reply,
kind regards,
Luke



the concept of an embedded database is quite new to me and I like it.


> Any other thoughts?
> 
> Myrna
> 


-- 
............._
:|  .| |.|/.|_ 
:|__.|_|.|\.|_
:0421 276 282.

Mime
View raw message