Chmod CuteFTP

Posted on 2006-04-24
Last Modified: 2008-02-01
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?

Question by:rwhubbard996
    LVL 63

    Expert Comment

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

    LVL 63

    Accepted Solution

    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.


    Author Comment

    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.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
    When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (, typical array handling might look like this: (CODE) B…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now