Feb 14, 2011, 8:01 AM
Post #1 of 3
I have a few sites that have the same perl script in them. One for a search, survey script, things like that. Currently I use ftp to upload to every site, each time I make an alteration to each perl script. To save time, I thought I would make a perl script that would write scripts to each website. That way, I ftp once then run the "perl making script" to write the new code to the rest of the websites.
Using perl to create a perl script
So I ftp hiworld.pl to site-x. Then run make-hiworld.pl and in site-y, site-z... make-hiworld.pl writes the contents of hiworld.pl from site-x to hiworld.pl in site-y, site-z... Not complicated but I can not get round the permissions.
It works if I set permissions of cgi-bin to 777. But that is a security risk.
I thought about setting permissions to 777 in the script and then 755 after writing but that operation is not allowed from within a script on my server.
What can I do? Thanks.
(This post was edited by swanny99 on Feb 14, 2011, 3:50 PM)