[gpfsug-discuss] immutable file in an immutable folder can be touched

Hannappel, Juergen juergen.hannappel at desy.de
Mon Mar 28 10:50:50 BST 2022


Hi,
I have an immutable file in an immutable folder:

mmchattr -i yes mutabilityTest/file
mmchattr -i yes mutabilityTest
ls -la mutabilityTest 
total 18
drwxr-xr-x 2 hannappj it 4096 Mar 28 11:45 .
drwxr-xr-x 7 hannappj it 8192 Mar 28 11:45 ..
-rw-r--r-- 1 hannappj it   30 Mar 28 11:45 file

mmlsattr -L mutabilityTest mutabilityTest/file | grep immu
immutable:            yes
immutable:            yes


Now i do a touch:
touch mutabilityTest/file

 no error, and the modification time is changed:
ls -la mutabilityTest                         
total 18
drwxr-xr-x 2 hannappj it 4096 Mar 28 11:45 .
drwxr-xr-x 7 hannappj it 8192 Mar 28 11:45 ..
-rw-r--r-- 1 hannappj it   30 Mar 28 11:46 file

stat mutabilityTest/file
  File: ‘mutabilityTest/file’
  Size: 30        	Blocks: 2          IO Block: 4194304 regular file
Device: 2eh/46d	Inode: 112989      Links: 1
Access: (0644/-rw-r--r--)  Uid: (28851/hannappj)   Gid: ( 1000/      it)
Access: 2022-03-28 11:46:28.454807982 +0200
Modify: 2022-03-28 11:46:28.454807982 +0200
Change: 2022-03-28 11:46:28.454807982 +0200


Shouldn't the immutability of the file include its change time?

 

-- 
Dr. Jürgen Hannappel  DESY/IT    Tel.  : +49 40 8998-4616




More information about the gpfsug-discuss mailing list