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

Paul Ward p.ward at nhm.ac.uk
Mon Mar 28 14:23:56 BST 2022


Hi Jürgen,

We noticed this behaviour when we were trying to test immutability on our newly installed solution.
We tried using touch with a date in the past to test the expiry date.
We noticed although touch changed the timestamp, it didn't change wherever the policy engine checked.

We found a work around for our testing, so I think we accepted it as a 'feature'. 
I can't find a support ticket, so I am assuming we didn't report it.


Kindest regards,
Paul

Paul Ward
TS Infrastructure Architect
Natural History Museum
T: 02079426450
E: p.ward at nhm.ac.uk


-----Original Message-----
From: gpfsug-discuss <gpfsug-discuss-bounces at gpfsug.org> On Behalf Of Hannappel, Juergen
Sent: 28 March 2022 13:25
To: gpfsug-discuss <gpfsug-discuss at gpfsug.org>
Subject: Re: [gpfsug-discuss] immutable file in an immutable folder can be touched

... if I try a similar action e.g on ext4 where I can use the posix way with ioctl(fd, FS_IOC_GETFLAGS, &flags) flags |= FS_IMMUTABLE_FL; ioctl(fd, FS_IOC_SETFLAGS, &flags)

the touch fails and the mtime remains unchanged....

----- Original Message -----
> From: "Juergen Hannappel" <juergen.hannappel at desy.de>
> To: "gpfsug main discussion list" <gpfsug-discuss at spectrumscale.org>
> Sent: Monday, 28 March, 2022 11:50:50
> Subject: [gpfsug-discuss] immutable file in an immutable folder can be 
> touched

> 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
> 
> _______________________________________________
> gpfsug-discuss mailing list
> gpfsug-discuss at gpfsug.org
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsu
> g.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss_gpfsug.org&data=04%7C0
> 1%7Cp.ward%40nhm.ac.uk%7C2c7afbe81224404273cf08da10b63ad3%7C73a29c014e
> 78437fa0d4c8553e1960c1%7C1%7C0%7C637840672748970653%7CUnknown%7CTWFpbG
> Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
> 3D%7C3000&sdata=I9bS8GSW5AeZbEg%2FQR2aCQd4KNd3lRmg2K1NJ3hQTk4%3D&a
> mp;reserved=0

_______________________________________________
gpfsug-discuss mailing list
gpfsug-discuss at gpfsug.org
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss_gpfsug.org&data=04%7C01%7Cp.ward%40nhm.ac.uk%7C2c7afbe81224404273cf08da10b63ad3%7C73a29c014e78437fa0d4c8553e1960c1%7C1%7C0%7C637840672749126883%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=O3t6BTddF3gL4DGlRAA9eweV8Vk%2BdwXj1We4GrGU%2BY8%3D&reserved=0




More information about the gpfsug-discuss mailing list