Removed modify attribute from a file need it back

Someone removed the modify attribute from one of our files and we need to
either get it back or remove it. Thank You for any input.

Jimmy Thornton <jthornton@microbeef.com> wrote:

Someone removed the modify attribute from one of our files and we need to
either get it back or remove it. Thank You for any input.

Try getting

ftp.qnx.com:/usr/free2/quantum/util/restore_modify

I’m not sure the easiest way to get this to a QNX2 machine – if you
have an old quics account, you may still be able to dial-in and get
it. If you have the DOS filesystem stuff for QNX2, you should be able
to download this to Windows and put it on a FAT16 floppy then read it
from QNX2. If you have a QNX4 box, you should be able to have it
talk to your QNX2 box using qcp over a serial cable – getting it to
a QNX4 box is easier, as the utility to read DOS floppies is shipped
with the system.

-David

Jimmy Thornton <jthornton@microbeef.com> wrote:

Someone removed the modify attribute from one of our files and we need to
either get it back or remove it. Thank You for any input.

Also, if you can’t get the restore_modify that I suggested, I think that
zap was shipped with QNX2 – it tends to be a big hammer for getting rid
of files. It might work. (Then again, it might not.) If zap on the
file doesn’t work, try copying everything but the offending file out of
the directory it is in, then applying zap to the directory, that might
work. If you use zap, you should follow up by running the filesystem
verifier which was, I think, called chkfsys even back in QNX2 days.

-David

Previously, Jimmy Thornton wrote in qdn.public.qnx2:

Someone removed the modify attribute from one of our files and we need to
either get it back or remove it. Thank You for any input.

As I recall, the QNX2 filesystem is fairly well documented in
the back of the manuals. You could use spatch on the directory,
find the files directory entry, find the attribute field within
the directory, and patch the value. I’d recommend backing things
up first. I’ve done this several times and it was fairly easy
to do.

Jimmy Thornton <jthornton@microbeef.com> wrote:

Someone removed the modify attribute from one of our files and we need to
either get it back or remove it. Thank You for any input.

Maybe this only worked for removing the modify attribute after a reboot
(reaching way back in my memory) but couldn’t you just do

chattr filename a=+m to add it
chattr filename a=-m to remove it

or some such combination?

Steven Dufresne <stevend@qnx.com> wrote:

Jimmy Thornton <> jthornton@microbeef.com> > wrote:
Someone removed the modify attribute from one of our files and we need to
either get it back or remove it. Thank You for any input.

Maybe this only worked for removing the modify attribute after a reboot
(reaching way back in my memory) but couldn’t you just do

chattr filename a=+m to add it
chattr filename a=-m to remove it

or some such combination?

Oops, that was the busy bit nightmare that I was actually remembering.
I did say I was reaching way back. :slight_smile: