|
You're right, Rob
$ echo woof >foo
$ ls -l foo
-rw-r--r-- 1 jwoehr 0 5 Apr 5 09:00 foo
$ cl "chgatr obj('/home/jwoehr/foo') atr(*readonly) value(*yes)"
CPFB414: Attributes changed for 1 objects. 0 objects not changed.
$ ls -l foo
-rw-r--r-- 1 jwoehr 0 5 Apr 5 09:00 foo
$ rm -rf foo
rm: cannot remove 'foo': System call error number 3500.
$ cl "chgatr obj('/home/jwoehr/foo') atr(*readonly) value(*no)"
CPFB414: Attributes changed for 1 objects. 0 objects not changed.
$ rm foo
$ ls -l foo
ls: cannot access 'foo': A file or directory in the path name does not
exist.
So why use these attributes (or authorities) ... What is provided that
Unix doesn't provide in this regard.
The attributes for CCSID, yes. Readonly? Why?
I suppose it prevents finger slips.
________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Rob
Berendt <robertowenberendt@xxxxxxxxx>
Sent: Friday, April 5, 2024 6:23 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Read-only dir & files within?
Jack Woehr,
Look at the documentation for this command:
CHGATR OBJ('/mylink') ATR(*READONLY) VALUE(*YES)
https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/cl/chgatr.html<
https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/cl/chgatr.html>
It's not an authority. It's an attribute.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.