sftp to rename file - SSH

This is a discussion on sftp to rename file - SSH ; I'm wondering if this is possible, but I can't find a force overwrite flag so I think it must be correct syntax. OpenSSH_4.1p1, OpenSSL 0.9.7g 11 Apr 2005 I have two files on a remote system, test.OLD and test.NEW. I ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: sftp to rename file

  1. sftp to rename file

    I'm wondering if this is possible, but I can't find a force overwrite
    flag so I think it must be correct syntax.

    OpenSSH_4.1p1, OpenSSL 0.9.7g 11 Apr 2005

    I have two files on a remote system, test.OLD and test.NEW. I want to
    sftp over to the remote system and rename test.OLD test.NEW, but when
    I do, I get an error message stating it's failed. The permissions are
    777 on the target files. Is there a flag I'm missing?

    Thanks!

  2. Re: sftp to rename file

    >>>>> "KS" == Damsel writes:

    KS> I'm wondering if this is possible, but I can't find a force
    KS> overwrite flag so I think it must be correct syntax.

    KS> OpenSSH_4.1p1, OpenSSL 0.9.7g 11 Apr 2005

    KS> I have two files on a remote system, test.OLD and test.NEW. I
    KS> want to sftp over to the remote system and rename test.OLD
    KS> test.NEW, but when I do, I get an error message stating it's
    KS> failed. The permissions are 777 on the target files. Is there a
    KS> flag I'm missing?

    The relevant permissions are those on the containing directory, not the file(s).

    --
    Richard Silverman
    res@qoxp.net


  3. Re: sftp to rename file

    Not only are the permissions 777 on the target files and NOW the
    containing directory, but the user that I am sftping over with is the
    owner of the whole directory and subdirectory structure.


    On Jan 2, 7:45*pm, "Richard E. Silverman" wrote:
    > >>>>> "KS" == Damsel * writes:

    >
    > * * KS> I'm wondering if this is possible, but I can't find a force
    > * * KS> overwrite flag so I think it must be correct syntax.
    >
    > * * KS> OpenSSH_4.1p1, OpenSSL 0.9.7g 11 Apr 2005
    >
    > * * KS> I have two files on a remote system, test.OLD and test.NEW. *I
    > * * KS> want to sftp over to the remote system and rename test.OLD
    > * * KS> test.NEW, but when I do, I get an error message stating it's
    > * * KS> failed. *The permissions are 777 on the target files. *Is there a
    > * * KS> flag I'm missing?
    >
    > The relevant permissions are those on the containing directory, not the file(s).
    >
    > --
    > * Richard Silverman
    > * r...@qoxp.net



  4. Re: sftp to rename file

    >>>>> "KS" == Damsel writes:

    KS> Not only are the permissions 777 on the target files and NOW the
    KS> containing directory, but the user that I am sftping over with is
    KS> the owner of the whole directory and subdirectory structure.

    OK -- checking the sftp-server code, we find that its "rename" command
    does not support renaming a file "over" another in that way that the Unix
    "mv" command does; that is, first unlinking the destination name if it
    exists. You'll have to do that yourself.

    KS> On Jan 2, 7:45*pm, "Richard E. Silverman" wrote:
    >> >>>>> "KS" == Damsel * writes:

    >>
    >> * * KS> I'm wondering if this is possible, but I can't find a force
    >> * * KS> overwrite flag so I think it must be correct syntax.
    >>
    >> * * KS> OpenSSH_4.1p1, OpenSSL 0.9.7g 11 Apr 2005
    >>
    >> * * KS> I have two files on a remote system, test.OLD and
    >> test.NEW. *I * * KS> want to sftp over to the remote system and
    >> rename test.OLD * * KS> test.NEW, but when I do, I get an error
    >> message stating it's * * KS> failed. *The permissions are 777 on
    >> the target files. *Is there a * * KS> flag I'm missing?
    >>
    >> The relevant permissions are those on the containing directory, not
    >> the file(s).
    >>
    >> -- * Richard Silverman * r...@qoxp.net



    --
    Richard Silverman
    res@qoxp.net


+ Reply to Thread