Re: Create read-only data
Is this a java programming problem
or a database problem or file system problem?
Re: Create read-only data
I don\'t have much experience with Derby DB. Are users able to open these databases outside of the application?
Re: Create read-only data
Quote:
Originally Posted by
Norm
Is this a java programming problem
or a database problem or file system problem?
I think it is a programming problem, because as owner of the db i can give always all rights.
Quote:
Originally Posted by
JavaPF
I don't have much experience with Derby DB. Are users able to open these databases outside of the application?
If you know the user and password you are able to open a connection outside of the application.
My application only has one user and doesn't provide any possibility to update these data. But if you open a direct db connection, you are able to execute all sql cmds.
It wouldn't help me if I restrict this user or these tables, because i am the admin and i can give me all right at any moment. :(
Therefore there are any component which would help me to create read-only data? :confused:
Re: Create read-only data
Quote:
Originally Posted by
marky8264
My application only has one user and doesn't provide any possibility to update these data. But if you open a direct db connection, you are able to execute all sql cmds.
It wouldn't help me if I restrict this user or these tables, because i am the admin and i can give me all right at any moment. :(
Therefore there are any component which would help me to create read-only data? :confused:
Never used Derby, but I'm guessing like other databases you should be able to create a new user and grant only the permissions necessary to this user (in your case read only - this should be done regardless: its always recommended that you shouldn't be allowing clients to access a database as the root user). Your client then accesses the database using this new username/password
Re: Create read-only data
Quote:
Originally Posted by
copeg
Never used Derby, but I'm guessing like other databases you should be able to create a new user and grant only the permissions necessary to this user (in your case read only - this should be done regardless: its always recommended that you shouldn't be allowing clients to access a database as the root user). Your client then accesses the database using this new username/password
If i create a new restricted user nevertheless i always have the possibility to update these data.
My problem is:
I am the admin and i must write a system, which restrict my rights.
I should not be able to edit these data.
The other users have no possibility to edit, because the application doesn't provide any way of manipulation.
Give there are any component, which solve my problem, or another way? :confused:
Re: Create read-only data
Quote:
i must save these data read-only
There is a contradiction here. If you are saving the data, then you must have write authority.
Some one must have update authority.
If the data were saved in a simple file, you could set the R/O flag for the file to prevent it being accidentally updated.
But if you can set the R/O flag on, you can set it off.
I don't know of a WRITE-ONCE flag or option.
Re: Create read-only data
Quote:
Originally Posted by
marky8264
If i create a new restricted user nevertheless i always have the possibility to update these data.
My problem is:
I am the admin and i must write a system, which restrict my rights.
I should not be able to edit these data.
The other users have no possibility to edit, because the application doesn't provide any way of manipulation.
Give there are any component, which solve my problem, or another way? :confused:
I'm still not entirely sure I understand the problem, but I'll recommend the solution again: create a new user and restriction the permissions. You should be able to restrict the permissions to INSERT only to prevent any updates or deletes. Then if you as root user are afraid to alter the data, access the database as this user.
Re: Create read-only data
Quote:
Originally Posted by Norm,15251
There is a contradiction here. If you are saving the data, then you must have write authority.
Some one must have update authority.
If the data were saved in a simple file, you could set the R/O flag for the file to prevent it being accidentally updated.
But if you can set the R/O flag on, you can set it off.
I don't know of a WRITE-ONCE flag or option.
That is my problem, i must create these data.
That means, the only way i can solve my problem is to save these data on WORMs? :confused:
Quote:
Originally Posted by
copeg
I'm still not entirely sure I understand the problem, but I'll recommend the solution again: create a new user and restriction the permissions. You should be able to restrict the permissions to INSERT only to prevent any updates or deletes. Then if you as root user are afraid to alter the data, access the database as this user.
But this solution doesn't solve my problem, because i have the possibility to use the root user to edit these data.
My problem is a have always the possibility to edit these data. Therefore i must limit my own rights.
Is this possible?
Sry for my bad English, i am not good at English, but i give my best. I hope you can understand me.
Re: Create read-only data
Require two passwords and hire an armed guard to be the only one with the other password.
Re: Create read-only data
Quote:
Originally Posted by
marky8264
That is my problem, i must create these data.
That means, the only way i can solve my problem is to save these data on WORMs? :confused:
But this solution doesn't solve my problem, because i have the possibility to use the root user to edit these data.
My problem is a have always the possibility to edit these data. Therefore i must limit my own rights.
Is this possible.
Then never log in as the root user.