What's wrong here? #!/usr/bin/perl -w use strict; $WEB_GID=5001; $file = "newfile.html"; # go into the docroot chdir "/web/www.example.com/htdocs"; # create the file open NEWFILE, ">$file"; print NEWFILE <STDIN>; close NEWFILE; # change group owner of file to 'web' and # make it readable by 'web' (webserver user) chown -1, $WEB_GID, $file; chmod 640, $file;
Copyright 2003, Bri Hatch of Onsight, Inc.
Presented at SPUG, 2003.
Presentation created using vim and MagicPoint.