From rkleeman at energoncube.net Mon Sep 20 15:29:41 2004 From: rkleeman at energoncube.net (Bob Kleemann) Date: Mon Sep 20 15:29:49 2004 Subject: [San-Diego-pm] Meeting tommorow! Message-ID: <20040920202941.GD3516@energoncube.net> Hey Folks, We've got a meeting planned for tommorow evening. Same details as always, 7PM at Callahan's in Mira Mesa. Let me know if you're coming so I can reserve a reasonably sized table. I hope to see you all tommorow. From joel at fentin.com Thu Sep 23 19:03:28 2004 From: joel at fentin.com (Joel Fentin) Date: Thu Sep 23 19:03:34 2004 Subject: [San-Diego-pm] Operating on files over there Message-ID: <41536450.8020306@fentin.com> I need to operate on files not located at the same URL where the perl script is. Rename, Copy, and Move seem to work only with relative addresses. This is not a permission problem. Is there a reasonably easy way? -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 Contact me: http://fentin.com/me/ContactMe.html Biz: http://fentin.com Personal: http://fentin.com/me/ From emileaben at yahoo.com Thu Sep 23 22:50:28 2004 From: emileaben at yahoo.com (Emile Aben) Date: Thu Sep 23 22:50:37 2004 Subject: [San-Diego-pm] Operating on files over there In-Reply-To: <41536450.8020306@fentin.com> Message-ID: <20040924035028.89481.qmail@web60803.mail.yahoo.com> Hi Joel, is the webserver you are using change-rooted maybe? As far as I know cgi-scripts have access to the whole filesystem as long as the user the script runs as (typically 'nobody') can access the file as well. Emile --- Joel Fentin wrote: > I need to operate on files not located at the same > URL where the perl > script is. Rename, Copy, and Move seem to work only > with relative > addresses. This is not a permission problem. > > Is there a reasonably easy way? > -- > Joel Fentin tel: 760-749-8863 FAX: > 760-749-8864 > Contact me: http://fentin.com/me/ContactMe.html > Biz: http://fentin.com > Personal: http://fentin.com/me/ > _______________________________________________ > San-Diego-pm mailing list > San-Diego-pm@mail.pm.org > http://www.pm.org/mailman/listinfo/san-diego-pm > __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From joel at fentin.com Fri Sep 24 09:19:12 2004 From: joel at fentin.com (Joel Fentin) Date: Fri Sep 24 09:19:18 2004 Subject: [San-Diego-pm] Operating on files over there In-Reply-To: <20040924043903.GA17071@whale.casinghino.com> References: <41536450.8020306@fentin.com> <20040924043903.GA17071@whale.casinghino.com> Message-ID: <41542CE0.5060101@fentin.com> Michael Casinghino wrote: > rcp, scp and rsync all do this. If these are windows machines, you > may be able to use the dos commands if the remote drive are mapped > locally. I looked for rcp, scp, and rsync in the index of programming perl and didn't find them. I also looked for them in perldoc. Could you please leave more clues. The servers are not windows machines. -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 Contact me: http://fentin.com/me/ContactMe.html Biz: http://fentin.com Personal: http://fentin.com/me/ From joel at fentin.com Fri Sep 24 09:14:10 2004 From: joel at fentin.com (Joel Fentin) Date: Fri Sep 24 09:19:33 2004 Subject: [San-Diego-pm] Operating on files over there In-Reply-To: <20040924035028.89481.qmail@web60803.mail.yahoo.com> References: <20040924035028.89481.qmail@web60803.mail.yahoo.com> Message-ID: <41542BB2.3000507@fentin.com> Emile Aben wrote: > Hi Joel, > > is the webserver you are using change-rooted maybe? > As far as I know cgi-scripts have access to the whole > filesystem as long as the user the script runs as > (typically 'nobody') can access the file as well. I don't know what change-rooted is. My problem is that perl is running on xxx.com and I want to do a number of things on yyy.com. If you have a specific example of how to do it, I would appreciate that. -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 Contact me: http://fentin.com/me/ContactMe.html Biz: http://fentin.com Personal: http://fentin.com/me/ From brickster3072 at gmail.com Fri Sep 24 09:54:16 2004 From: brickster3072 at gmail.com (Brick Robbins) Date: Fri Sep 24 09:54:29 2004 Subject: [San-Diego-pm] Operating on files over there In-Reply-To: <41542BB2.3000507@fentin.com> References: <20040924035028.89481.qmail@web60803.mail.yahoo.com> <41542BB2.3000507@fentin.com> Message-ID: > I don't know what change-rooted is. My problem is that perl is running > on xxx.com and I want to do a number of things on yyy.com. If you have a > specific example of how to do it, I would appreciate that. What sort of OS is yyy.com running, and what what sort of network connects them? Is perl also running on xxx.com? What sort of server/client software is running on yyy.com? From emileaben at yahoo.com Fri Sep 24 10:10:06 2004 From: emileaben at yahoo.com (Emile Aben) Date: Fri Sep 24 10:10:14 2004 Subject: [San-Diego-pm] Operating on files over there In-Reply-To: <41542BB2.3000507@fentin.com> Message-ID: <20040924151006.41289.qmail@web60807.mail.yahoo.com> Hi, change rooted basically means that the webserver has been setup in such a way that it is only possible to access a part of the filesystem (the root of the filesystem was changed). >From the description it is not clear to me what the exact problem is. * Are the files you want to process on the same machine but in a different website-tree as your CGI-script? * Do you have complete control over the machine(s) on which the files are located, or are we talking about a hosted setup? Emile --- Joel Fentin wrote: > Emile Aben wrote: > > Hi Joel, > > > > is the webserver you are using change-rooted > maybe? > > As far as I know cgi-scripts have access to the > whole > > filesystem as long as the user the script runs as > > (typically 'nobody') can access the file as well. > > I don't know what change-rooted is. My problem is > that perl is running > on xxx.com and I want to do a number of things on > yyy.com. If you have a > specific example of how to do it, I would appreciate > that. > > -- > Joel Fentin tel: 760-749-8863 FAX: > 760-749-8864 > Contact me: http://fentin.com/me/ContactMe.html > Biz: http://fentin.com > Personal: http://fentin.com/me/ > > > > __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From joel at fentin.com Fri Sep 24 11:34:47 2004 From: joel at fentin.com (Joel Fentin) Date: Fri Sep 24 11:34:53 2004 Subject: [San-Diego-pm] Operating on files over there In-Reply-To: <20040924151006.41289.qmail@web60807.mail.yahoo.com> References: <20040924151006.41289.qmail@web60807.mail.yahoo.com> Message-ID: <41544CA7.1090300@fentin.com> Emile Aben wrote: >>From the description it is not clear to me what the > exact problem is. Example of the problem: The first of these two lines does not work. The second does. rename("http://xxx.com/cgi-bin/temp.txt","http://xxx.com/cgi-bin/temp.old"); rename("./temp.txt","./temp.old"); The lesson seems to be that absolute addressing does not work. I am going to need absolute addressing to rename temp.txt at another URL - unless the other URL is on the very same server with xxx.com. ========================= > * Are the files you want to process on the same > machine but in a different website-tree as your > CGI-script? Possibly. If so, I can revert to relative addressing. ========================= > * Do you have complete control over the machine(s) on > which the files are located, Nope! or are we talking about a > hosted setup? Hosted!! -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 Contact me: http://fentin.com/me/ContactMe.html Biz: http://fentin.com Personal: http://fentin.com/me/ From brickster3072 at gmail.com Fri Sep 24 11:42:42 2004 From: brickster3072 at gmail.com (Brick Robbins) Date: Fri Sep 24 11:42:49 2004 Subject: [San-Diego-pm] Operating on files over there In-Reply-To: <41544CA7.1090300@fentin.com> References: <20040924151006.41289.qmail@web60807.mail.yahoo.com> <41544CA7.1090300@fentin.com> Message-ID: Perl used the filesystem the path name, which is not the same as the URL, since the path to the webserver root URL is not the same as the filesystem root. If the perl script is being run as a CGI, then this should work rename("$ENV{'DOCUMENT_ROOT'}/cgi-bin/temp.txt","$ENV{'DOCUMENT_ROOT'}/cgi-bin/temp.old"); On Fri, 24 Sep 2004 09:34:47 -0700, Joel Fentin wrote: > Emile Aben wrote: > > >>From the description it is not clear to me what the > > exact problem is. > > Example of the problem: > The first of these two lines does not work. > The second does. > rename("http://xxx.com/cgi-bin/temp.txt","http://xxx.com/cgi-bin/temp.old"); > > rename("./temp.txt","./temp.old"); > > The lesson seems to be that absolute addressing does not work. I am > going to need absolute addressing to rename temp.txt at another URL - > unless the other URL is on the very same server with xxx.com. > ========================= > > * Are the files you want to process on the same > > machine but in a different website-tree as your > > CGI-script? > > Possibly. If so, I can revert to relative addressing. > ========================= > > * Do you have complete control over the machine(s) on > > which the files are located, > > Nope! > > or are we talking about a > > hosted setup? > > Hosted!! > > > > -- > Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 > Contact me: http://fentin.com/me/ContactMe.html > Biz: http://fentin.com > Personal: http://fentin.com/me/ > _______________________________________________ > San-Diego-pm mailing list > San-Diego-pm@mail.pm.org > http://www.pm.org/mailman/listinfo/san-diego-pm > From joel at fentin.com Fri Sep 24 12:55:32 2004 From: joel at fentin.com (Joel Fentin) Date: Fri Sep 24 12:55:37 2004 Subject: [San-Diego-pm] Operating on files over there In-Reply-To: References: <20040924151006.41289.qmail@web60807.mail.yahoo.com> <41544CA7.1090300@fentin.com> Message-ID: <41545F94.2030105@fentin.com> Brick Robbins wrote: > Perl used the filesystem the path name, which is not the same as the > URL, since the path to the webserver root URL is not the same as the > filesystem root. > > If the perl script is being run as a CGI, then this should work > > rename("$ENV{'DOCUMENT_ROOT'}/cgi-bin/temp.txt","$ENV{'DOCUMENT_ROOT'}/cgi-bin/temp.old"); I assume $ENV{'DOCUMENT_ROOT'} is for xxx.com where the perl script is, and not for yyy.com where I want to do my work. -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 Contact me: http://fentin.com/me/ContactMe.html Biz: http://fentin.com Personal: http://fentin.com/me/ From cabney at ucsd.edu Fri Sep 24 12:56:01 2004 From: cabney at ucsd.edu (C. Abney) Date: Fri Sep 24 13:06:34 2004 Subject: [San-Diego-pm] Operating on files over there In-Reply-To: <41544CA7.1090300@fentin.com> References: <20040924151006.41289.qmail@web60807.mail.yahoo.com> <41544CA7.1090300@fentin.com> Message-ID: <1096048561.1868.44.camel@vespa> On Fri, 2004-09-24 at 09:34, Joel Fentin wrote: > Example of the problem: > The first of these two lines does not work. > The second does. > rename("http://xxx.com/cgi-bin/temp.txt","http://xxx.com/cgi-bin/temp.old"); > > rename("./temp.txt","./temp.old"); You are trying to get a (local) perl executable to do file manipulation on a remote machine? I think you /did/ say earlier you wanted to do file manipulations on a remote machine. In any case, if the web-server is set up correctly no one can do file manipulations from a remote site through HTTP. The best you can hope for is: 1. Perlish: write a script on the remote server that performs the action, and call that script from your (local?) server pages. 2. NonPerlish: have your local server script use system commands that employ rsh, ssh, > The lesson seems to be that absolute addressing does not work. I am > going to need absolute addressing to rename temp.txt at another URL - > unless the other URL is on the very same server with xxx.com. You aren't comparing absolute addressing to relative addressing. One solution has access to the OS system calls and is manipulating local files. The other solution is attempting to manipulate remote files, or to perform file system manipulations via HTTP, but is actually trying to use system calls on files that don't exist (a URI is a meaningless string as far as those system calls are concerned), which isn't a part of the standard (thank goodness!) > > * Are the files you want to process on the same > > machine but in a different website-tree as your > > CGI-script? > > Possibly. If so, I can revert to relative addressing. You still can't do it using URIs in your system calls. > ========================= > > * Do you have complete control over the machine(s) on > > which the files are located, > > Nope! Do you have control over the files on the machine, and are you able to execute commands on them and can you create script-based web-pages on the machine where the files are located? Yours, -- Charles Abney Polymorphism Research Laboratory, 0603 UCSD School of Medicine 9500 Gilman Dr. La Jolla, CA 92093-0603 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 307 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/pipermail/san-diego-pm/attachments/20040924/bae3f81b/attachment.bin From joel at fentin.com Fri Sep 24 15:29:19 2004 From: joel at fentin.com (Joel Fentin) Date: Fri Sep 24 15:29:27 2004 Subject: [San-Diego-pm] Operating on files over there In-Reply-To: <1096048561.1868.44.camel@vespa> References: <20040924151006.41289.qmail@web60807.mail.yahoo.com> <41544CA7.1090300@fentin.com> <1096048561.1868.44.camel@vespa> Message-ID: <4154839F.3070002@fentin.com> At last. You are addressing the heart and soul of what I am attempting. C. Abney wrote: > You are trying to get a (local) perl executable to do file manipulation > on a remote machine? I think you /did/ say earlier you wanted to do > file manipulations on a remote machine. > > In any case, if the web-server is set up correctly no one can do file > manipulations from a remote site through HTTP. Thank you. That is the answer I was after. ========================= > The best you can hope for is: > > 1. Perlish: write a script on the remote server that performs > the action, and call that script from your (local?) server > pages. > > 2. NonPerlish: have your local server script use system commands > that employ rsh, ssh, It may come to that. I hope not. ============================= > Do you have control over the files on the machine, and are you able to > execute commands on them and can you create script-based web-pages on > the machine where the files are located? To the extent that I understand the question: Yes. I have the passwords and can put/delete perl scripts with ws_ftp. For the moment, all web sites seem to be on the same server. I have had some luck with relative addressing. I was able to read a yyy.com file from xxx.com and to add to it. Both were on the same server. -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 Contact me: http://fentin.com/me/ContactMe.html Biz: http://fentin.com Personal: http://fentin.com/me/