• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 379
  • Last Modified:

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?

Thanks,
Roger
0
rwhubbard996
Asked:
rwhubbard996
  • 2
1 Solution
 
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:
http://help.globalscape.com/help/guides/CuteFTP_Pro7_User_Guide.pdf

0
 
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.

0
 
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.

Thanks,
Roger

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now