Operating System - OpenVMS
1827819 Members
2142 Online
109969 Solutions
New Discussion

default protection and backup

 
SOLVED
Go to solution
Willem Grooters
Honored Contributor

default protection and backup

I wonder what I missed: (VMS 8.2 AXP)

I have files created with a UIC-based protection (s:wred, o:rwed, g:re, w:), owned by SYSTEM. In a batch procedure run under a system account,these files are copied to another location using BACKUP:
$ BACKUP/LOG/BY_OWNER=
The destination directory has a default protection specified: (DEFAULT_PROTECTION,SYSTEM:RWEDC,OWNER:RWEDC,GROUP:RWE,WORLD:RE).

I expect that the UIC-base protection defined on the directory is used, but it seems that this DEFAULT_PROTECTION is bypassed, and the original UIC-based protection is copied.
Willem Grooters
OpenVMS Developer & System Manager
12 REPLIES 12
Wim Van den Wyngaert
Honored Contributor

Re: default protection and backup

Without testing : /by_owner is a input or ourput aualifier. Did you place it correctly ?

Did you hacve sysprv or where you logged in as the owner ?

Wim
Wim
Karl Rohwedder
Honored Contributor

Re: default protection and backup

I can reproduce this behaviour also under V8.3/Alpha. I think, this is expected, for backup to produce an exact copy of the file.
Using the COPY utility in the opposite the new file takes the default protection.

regards Kalle
Wim Van den Wyngaert
Honored Contributor

Re: default protection and backup

Mmm, should read better.

Found no way of creating the files with backup and following the acl protection.

New for me (newbe in acl's) is that you can do your backup and do
$ set sec/def *.*.*.
This works but modifies the mod date of the files.

Wim
Wim
Volker Halle
Honored Contributor
Solution

Re: default protection and backup

Willem,

try using BACKUP/INTERCHANGE

/INTERCHANGE is supposed to not copy certain file attributes (including ACLs).

And it will do what you expect it to do in your case. At least with V8.2.

Volker.
Wim Van den Wyngaert
Honored Contributor

Re: default protection and backup

I can confirm Volkers words for 7.3.
But note that acl's are NOT copied when using /interchange. And check help backup/int : I don't understand the first remark.

Wim
Wim
Karl Rohwedder
Honored Contributor

Re: default protection and backup

Normally BACKUP also treats all DIR-files, even if no file in them is selected to allow for a incremental restore (delete files which should be deleted). /INTERCHANHE skips such directories if they aren't selected by filename.

regards Kalle
Wim Van den Wyngaert
Honored Contributor

Re: default protection and backup

Karl,

Example of how to "select by name" ?
I always seem to get the empty directory too.

Wim
Wim
Jan van den Ende
Honored Contributor

Re: default protection and backup

Willem,

have you ever looked at a Backup output qual /BY_OWN=parent?

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Wim Van den Wyngaert
Honored Contributor

Re: default protection and backup

Jan,

tested it. Doesn't work either.
BTW : set priv/def *.* preserves acl's copied by backup.

Wim
Wim
Willem Grooters
Honored Contributor

Re: default protection and backup

Thanks to all.
Some have appearently assumed ACL on the files themselves. That is _not_ the case: nor sorce, nor destination carry ICL protection. According the manula, setting a default protection for all files in a directory is to specify THAT directory with the given ACE.
Another point is that the creation date needs to be preserved (preferrably).

Karl: Copy is not a real option: it can concern a number of files in one go, and some files can be locked at the time of copy. BACKUP/IGNORE=INTERLOCK solves this issue - and since it are all sequential files used for reference only (log files, to be precise) I don't bother on missing data ;-)

Jan: The destination owner is _not_ SYSTEM, but an normal user (used for general puposes). That's why I put /BY_OWNER= on the output size. But others (WORLD) must be able to read them.

Volker: Might be the solution if the creation date/time is preserved.

I will implement the solutions this week.
Willem Grooters
OpenVMS Developer & System Manager
Willem Grooters
Honored Contributor

Re: default protection and backup

/INTERCHANGE does the job, it even keeps the creation date. The inplied /CONVERT, causing loss of ODS-5 attributes, is no problem (file-spec is ODS-2-compliant)
Willem Grooters
OpenVMS Developer & System Manager
Willem Grooters
Honored Contributor

Re: default protection and backup

Workable solution from replies
Willem Grooters
OpenVMS Developer & System Manager