To achieve your goal (restrict the access to read only for some specified users) you may have several things to check. I do not know how knowledgeable you are regarding security but here are a few points.
Every table on the IBM i has a default access right assign to it. You can see this information with the command:
DSPOBJAUT OBJ(MyLib/MyFile) OBJTYPE(*FILE).
You will then see a screen that shows the access level granted for this table. The access next to the *PUBLIC user is the default. If it is *CHANGE or *ALL, then everyone can modify the table and you may not want to change this because your applications probably expect to have access. If so, the exit program mentioned in another post would probably be the only choice that would avoid a full analyses of your applications portfolio.
If the *PUBLIC access is *USE or *NONE, then that means that your users have authority given to them for that specific table. Now, you may be able to do something relatively easy to fix your issue. I say "may" because there are a lot of ways that security can be configured.
If, on the same DSPOBJAUT screen you see the name of the user that you want to restrict with access right of *CHANGE or *ALL, you just have to change this authority with the command: GRTOBJAUT. Be careful, this will change their access right for all access, even for access trough an RPG program on the IBM i.
For those tips, I presume that your system has minimal security setup. There are a lot of ways to control the security on IBM I (authorisation list, adopted authority ...) I wont go into those details here. I think that in another post, someone put the link to some documentation.
Final word. Before messing with any security setup, make sure that you know what you are doing. If your not sure, get some kind of expert involved.
Hope this help
Denis Robitaille
Chef de service TI - Solution Entreprise
Infrastructure et Opérations
Cascades Centre des technologies,
412 Marie Victorin
Kingsey falls(Québec) Canada J0A 1B0
T : 819 363 6130
-----Message d'origine-----
De : MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de Hoteltravelfundotcom
Envoyé : 19 février 2016 10:02
À : Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Objet : Not allowing update on a file
HI we have users who have access to IBM i tables using the OPENQUERY on the SQL Server. Some of the users /developers are able to Insert rows and ALSO UPDATE. We would like to prevent such updates from the SQL Query.
What options do I have to prevent any such updates coming from a remote method as this?
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.