Chmod CuteFTP

What I am trying to do is change the permission of a file 'on the fly' so a PHP script can save a modified HTML page to our remote server.

Through JavaScript the CuteFTP transfer engine can be controlled.

Anyone have any experience doing this or ideas how to begin?

Who is Participating?
ZvonkoSystems architectCommented:
And that manual is an example how to do chmod on remote FTP server:

Set MySite = CreateObject("CuteFTPPro.TEConnection")
‘Initialize all necessary fields for MySite : host name, user, password, etc.
strMODE = "777" ‘full permissions
strFile = InputBox("Type in the file name below ", "CHMOD Dialog",
"cftppro10.log") ‘an input dialog with some default content
strvar = "SITE CHMOD " & strMODE & " " & strFile ‘concatenate the values
MySite.RemoteCommand strvar 'send the command

That example is in VBScript and will pass the chmod command trough the COM/ActiveX object on clients machine.
That example can be easyly changed to JavaScript, but be aware that does not work for web pages.

ZvonkoSystems architectCommented:
Are you sure you are talking about cuteFTP and not about cuteHTML?
When you look in this file there is nowhere the word JavaScript:

rwhubbard996Author Commented:
Sorry for the delay I got sidetracked by the 'tyranny of the immediate'.

This is what I was referring to (from the GlobalScape website):

What is the Transfer Engine?
Built on a modular design platform, CuteFTP Professional's FTP Transfer Engine (TE) is completely independent of the main application's interface. You can control the TE through an industry standard COM (Component Object Model) interface using your favorite programming or scripting language, such as Visual Basic, Perl, ASP or JavaScript.

I was hoping to use JavaScript to do chmod remotely in a script, one file at a time.  I use php to create static html pages and want to update them from a script.  I have to leave the public access open (chmod 747) to the directory to enable fwrite() to save the modified html.

I may be going about this in the wrong way, and suggestions would be appreciated.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.