- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Error accessing authorization file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 12:19 AM
12-03-2007 12:19 AM
Error accessing authorization file
Now for the first time I got a batch job that failed to login. It got loginout.exe getting "LOGIN-F-FILEACC, error accessing system authorization file.
How can I change the file protection without getting this conflict. Is there a way for temporarily stopping all processes from doing logins (stop=hold for 0.001 sec).
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 12:30 AM
12-03-2007 12:30 AM
Re: Error accessing authorization file
If you want 'just to be sure', you may check it beforehand using F$FILE(fil,"PRO").
And perhaps enable auditing on it to check, who changes the protection.
regards kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 12:37 AM
12-03-2007 12:37 AM
Re: Error accessing authorization file
WIm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 11:43 AM
12-03-2007 11:43 AM
Re: Error accessing authorization file
I would like to play with your odds in the lottery!
Yes, SET FILE _does_ lock the target.
But, normally, for SUCH a short period that it is a challenge for statistics to hit it.
But you proved that it IS possible.
I would have argued that several other activities do also create short-lived locks on all kinds of objects, and that the designs of VMS is such, that in any fore-seen cases some way around it (eg, short wait) would be in place.
Obviously NOT all cases.
fwiw
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 01:40 PM
12-03-2007 01:40 PM
Re: Error accessing authorization file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 02:03 PM
12-03-2007 02:03 PM
Re: Error accessing authorization file
There is a way to stop logins but it won't help your immediate issue (see later...)
Your simplest solution is a retry loop. If you get a FILEACC error, just retry some "reasonable" number of times, say 20, with or even without a WAIT delay of a second or so. Unless you have an exceptionally busy system, that will work eventually. Report an error if it fails every attempt. It's a batch job so you really don't care how long it takes.
The easiest way to stop other processes from accessing SYSUAF is to open it for exclusive access. From DCL you'd have to do it in a retry loop because other processes may have it open with incompatible sharing options. But that won't help you because you'll be blocking the SET PROT yourself.
You could write a program which obtains exclusive access to the file and sets protection. I think if you use the ACP-QIO interface you may be able to do it without having to retry (low level file system - see chapter 1 of I/O Users Reference Manual), but this seems like extreme overkill to me for what you're trying to achieve.
As Karl suggested, checking the file attributes first to see if it's even necessary to attempt to change the protection will probably solve the problem. Since any process that wants to change it will have the same problem as you have.
I don't believe there's any way for you to change the protection without exposing some risk to other processes logging in. You can probably assume that an interactive or network user will simply retry if their login fails. To protect batch jobs, you could drop the queue limits to 0 before attempting to change the protection, then restore them immediately afterwards (but then you have to weigh up the risk of a failed batch login against the risk that your job will fail to restore the job limits on the queue!). I don't think there's much you can do about network jobs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 02:32 PM
12-03-2007 02:32 PM
Re: Error accessing authorization file
But FYI, you could use loginout callouts so that each step used to authorize the batch job (or logins for other process modes) is under your control.
So then if a LGI$ callback routine returns an error due to SYSUAF being locked your code could wait a bit and then retry the callback routine.
See the LOGINOUT routine chapter of the OpenVMS Utility Routines Manual.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 07:10 PM
12-03-2007 07:10 PM
Re: Error accessing authorization file
$ dir/prot/owner sys$sytem syauaf.dat
I think the owner should be user SYSTEM.
I would try some other method of security on the sysuaf other than setting its protection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2007 05:54 AM
12-04-2007 05:54 AM
Re: Error accessing authorization file
I don't know how many batch queues you have, but one "workaround" would be to stop/next your batch queue(s) temporarily while you do the set protection on the uaf file (also wondering why you are doing this on a daily basis) then restarting the queues after the set protection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2007 06:09 AM
12-04-2007 06:09 AM
Re: Error accessing authorization file
I think I will leave the situation as it is as on the hour of execution there is nothing important running.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2007 01:30 AM
12-07-2007 01:30 AM
Re: Error accessing authorization file
Preventing interactive users to login, set logins to zero. To prevent batch procedures to login, set queues on hold (STOP/NEXT). To prevent network users to login, disable services that can be accessed (thou that may cause severe problems outside).
To prevent login errors, you might think of this method (I _know_ it's not perfect at all and may have caveats, but it'sa way to get around it):
$ BACKUP/IGNORE=INTERLOCK SYSUAF.DAT SYSUAF1.DAT
$ BACKUP/IGNORE=INTERLOCK RIGHTSLIST.DAT RIGHTSLIST11.DAT
$ SET FILE/PROT=(W:RWED) SYSUAF1.DAT
$ OldUAF = F$TRNLNM("SYSUAF","LNM$SYSTEM")
$ OldRL = F$TRNLNM("RIGHTSLIST","LNM$SYSTEM")
$ DEFINE/SYSTEM/EXEC SYSUAF SYSUAF1.DAT
do your job on SYSUAF.DAT and RIGHTSLIST.DAT
$ IF OldUAF .NES. ""
$ THEN
$ DEFINE/SYSTEM/EXEC SYSUAF 'OldUAF'
$ ELSE
$ DEASSIGN/SYSTEM/EXEC SYSUAF
$ ENDIF
$ IF OldRL .NES. ""
$ THEN
$ DEFINE/SYSTEM/EXEC RIGHTSLIST 'OldRL'
$ ELSE
$ DEASSIGN/SYSTEM/EXEC RIGHTSLIST
$ ENDIF
$ DELETE SYSUAF1.DAT;*
$ DELETE RIGHTSLIST1.DAT;*
You will certianly loose information about logins during the transition period, and usage of AUTHORIZE should be prevented (or disabled); you'll have to decide whether that is a problem or not.
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2007 01:53 AM
12-07-2007 01:53 AM
Re: Error accessing authorization file
That is a problem for SOX. No go.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2007 04:48 AM
12-10-2007 04:48 AM
Re: Error accessing authorization file
As far as I know, we do not change the security on the sysuaf.dat.
The only job that opens the file is QUEUE_MANAGER at the moment.
Other batch jobs ran OK.
What else can cause this confict?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2007 04:56 AM
12-10-2007 04:56 AM
Re: Error accessing authorization file
check OPERATOR.LOG or the OpenVMS console (OPA0:) for any unusual errors seen at the time of this failure.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2007 05:01 AM
12-10-2007 05:01 AM
Re: Error accessing authorization file
Some batch jobs still fail to start at the moment, some start OK.
Some failed jobs can be started afterwards, and vice versa, but they all use the same account.
Can I find out who locks the SYSUAF, if it is a lock at all...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2007 05:01 AM
12-10-2007 05:01 AM
Re: Error accessing authorization file
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2008 11:08 PM
01-06-2008 11:08 PM
Re: Error accessing authorization file
I will remove the set file/prot.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2008 05:27 PM
01-07-2008 05:27 PM
Re: Error accessing authorization file
>Analogue problem today. During the set
>file/prot a f$sea was done on one of the
>files. As a result the f$sea returned "".
Huh? This must be something else entirely.
F$SEARCH does NOT require any kind of access to the target file. It can't be blocked by FLK, FILEACC or PRV. The only access that's required is R (or even E) to the containing directory tree. The file itself can be ACCESS=NONE, you can still search for it and determine its name.
Try it yourself...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2008 11:14 PM
01-07-2008 11:14 PM
Re: Error accessing authorization file
As soon as I started the set file/prot job, the f$sea job aborted (f$sea returning "").
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2008 04:29 PM
01-09-2008 04:29 PM
Re: Error accessing authorization file
>1 doing set file/prot/own of the
>directroy and 1 job doing f$sea of
>the file
Just to make sure we're 100% clear here...
Can you confirm that SET FILE/PROT and F$SEARCH of THE SAME FILE do NOT clash?
It's only a SET FILE/PROT of the DIRECTORY CONTAINING the target file of the F$SEARCH which causes trouble?
If so, that confirms what I said in my previous post, but it's NOT the same as your claim: "During the set file/prot a f$sea was done on one of the files. As a result the f$sea returned ""."
As I said F$SEARCH does not require any access to the target file, but it does require access to the enclosing directories.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2008 12:43 AM
01-14-2008 12:43 AM
Re: Error accessing authorization file
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2008 02:17 PM
01-14-2008 02:17 PM
Re: Error accessing authorization file
What version of VMS are you using?
To me this seems like a bug in the implementation of the f$search lexical function, especially if it isn't returning an error status. Can you supply a reproducer?
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2008 11:04 PM
01-14-2008 11:04 PM
Re: Error accessing authorization file
These are the 2 jobs you have to submit. The 2nd one will loop until the first one is submitted. The .dir file is my home directory.
IMO lexicals handle open files badly. I'm on 7.3.
$b:
$ on warning then exit
$ set file ops$mgr:[000000]wvw.dir /prot=(w:rwed)/own=sysmgr_wvw
$ goto b
$b:
$ if f$sea("OPS$MGR:[WVW]wim.lis") .eqs. "" then exit
$ x=f$sea("login.com") !reset
$ goto b
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2008 06:57 AM
01-15-2008 06:57 AM
Re: Error accessing authorization file
1) The behaviour is the same under OpenVMS 8.3
2) The error is trapped by RMS. DCL chooses to ignore it.
The full errors are:
STS: %RMS-E-FLK, file currently locked by another user
STV: %SYSTEM-W-ACCONFLICT, file access conflict
3) Strictly speaking this is correct.
- The directory file is open for write.
4) You can 'see' the error happen with SET WATCH FILE/CLASS=ALL
good:
%XQP, Thread #0, Volume protection: Access requested: 00000001, Status: 00000001, PrvUsd: 00000000
%XQP, Thread #0, File protection (101369,44,0): Access requested: 00000004, Status: 00000001, PrvUsd: 00000000
%XQP, Thread #0, Read only directory access (101369,44,0)
%XQP, Thread #0, Directory scan for: TMP.TMP;0, Status: 00000001
%XQP, Thread #0, Lookup (114092,113,0) Status: 00000001
bad:
%XQP, Thread #0, Volume protection: Access requested: 00000001, Status: 00000001, PrvUsd: 00000000
%XQP, Thread #0, File protection (101369,44,0): Access requested: 00000004, Status: 00000001, PrvUsd: 00000000
%XQP, Thread #0, Lookup (0,0,0) Status: 00000800
Reproducer in C below.
Cheers,
Hein.
$! --- l1.com ---
$i = 0
$on warning then exit
$loop:
$i = i + 1
$set file tmp.dir/prot=w:rwe/own=hein
$if i .eq. 1000*(i/1000) then write sys$output i
$goto loop
$! ---- l2.com ----
$i = 0
$on warning then exit
$loop:
$i = i + 1
$if f$search("[.tmp]tmp.tmp;0").eqs."" then goto done
$x = f$search("sys$login:login.com")
$if i .eq. 1000*(i/1000) then write sys$output i
$goto loop
$done:
$write sys$output i
$exit
/* l2.c. Hein van den Heuvel
** usage: $mcr dev:[dir]l2 [.sub]file.ext
*/
#include string
#include stdio
#include fab
#include nam
main(int argc, char *argv[]) {
int stat = 1, i = 0, sys$parse(), sys$search();
struct FAB fab = cc$rms_fab;
struct NAM nam = cc$rms_nam;
char esa[256], rsa[256], *func;
fab.fab$l_fna = argv[1];
fab.fab$b_fns = strlen(argv[1]);
fab.fab$l_nam = &nam;
nam.nam$l_esa = (char *) esa;
nam.nam$b_ess = 255;
nam.nam$l_rsa = (char *) rsa;
nam.nam$b_rss = 255;
while (1 & stat) {
if (!(++i % 1000)) printf ("%d\n",i);
func = "parse";
stat = sys$parse ( &fab ) ;
if ( 1 & stat ) {
func = "search";
stat = sys$search ( &fab );
}
}
printf ("i=%d, %s, sts=%d, stv=%d\n", i, func, fab.fab$l_sts, fab.fab$l_stv);
return stat;
}