... 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@desy.de> To: "gpfsug main discussion list" <gpfsug-discuss@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 http://gpfsug.org/mailman/listinfo/gpfsug-discuss_gpfsug.org
