As part of my OS class I am exposing students to Linux and some coding. Students are submitting their program in a specified directory and name in their own account (e.g.,
~/Prog1/Prog1.java). They can submit programs up to two days late.
I want to be able to avoid them modifying their programs after their "submission". My first thought is to disable or hide the
touch command so that they can't fudge the time stamp for the file when I check with
ls -l, but is that sufficient? Are there other relatively simple ways for them to sneak in a modification in their source without me being able to detect it? They are new to Linux - so not very knowledgeable.
Or is there a way for me to create a write-only directory so that they can copy their programs into it, but not modify the time stamp? Is there an easier way I'm not considering?
This is the RedHat 7.5 flavor of Linux.
I thought about posting in https://superuser.com/ or https://cseducators.stackexchange.com/ and I'd be happy to move my question there if that's more appropriate, though it fundamentally strikes me as a Linux question.
Would examining the change/modification time that
stat gives me be a fool-proof way for me to make sure files hadn't been messed with after submission?