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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



swanny99
New User

Feb 14, 2011, 8:01 AM

Post #1 of 3 (934 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 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)


swanny99
New User

Feb 17, 2011, 1:25 PM

Post #2 of 3 (857 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.


rovf
Veteran

Feb 22, 2011, 4:52 AM

Post #3 of 3 (821 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

Ronald

 
 


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

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