CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Using perl to create a perl script


New User

Feb 14, 2011, 8:01 AM

Post #1 of 3 (973 views)
Using perl to create a perl script Can't Post

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.

So I ftp to site-x. Then run and in site-y, site-z... writes the contents of from site-x to 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)

New User

Feb 17, 2011, 1:25 PM

Post #2 of 3 (896 views)
Re: [swanny99] Using perl to create a perl script [In reply to] Can't Post

I gratefully received a pm suggesting using perl to upload files.

I thought this would be ideal and I could upload images to public html areas.
However, I could not upload any files to the cgi bin because of permissions.

I find it hard to believe that this is not possible someway.

Any suggestions very welcome.


Feb 22, 2011, 4:52 AM

Post #3 of 3 (860 views)
Re: [swanny99] Using perl to create a perl script [In reply to] Can't Post

This depends on the kind of permission problems you receive. Does it work using plain command-line FTP? If it doesn't work either, this is not a Perl problem.

Another issue could be passive vs. active mode. Some servers require that you use one of them. From Perl, you can explicitly set the mode, as described by

perldoc Net::Ftp



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives