Platform: Solaris 5.7
I'm trying to develop a script in Perl (but this is not a perl question). That I would make world-readable and executable from my account for students to submit their solutions to programming assignments. For example, the student would write the code (happens to be java), compile, see that it works and then turn it in by running
prompt> ~myusername/submit.pl studentscode.java
The script copies over the file just fine (to a subdirectory of my home with the students' user name) but now I need for the script to make the file unreadable and unwriteable by anyone but me (and the directories the same way). A problem I have encountered is that I think the system administrator has disabled chown (I get a "not owner" error even though I am the owner). Possible solutions are: running the script setuid as me, or having the script email the file to me and then writing procmail rules to process it. I am familiar with neither of these methods so I could use some help and suggestions. Thanks in advance.