PDA

View Full Version : sending commands on SFTP over SSH connections


garfield.catnet
08-08-2013, 01:57 AM
* FlashFXP v[4].[25], build [1813], [x]registered, [ ]unregistered, [ ]pirated
* OS [x] Windows 8, [ ] Windows 7, [ ] WinXP, [ ] Other (specify)
* Running behind hardware router/firewall [x] Yes & Model [Fritz Box 6360], [ ] No, [ ] Not sure
* Running software firewall [ ] Yes, Name [ ], Ver. [ ], or [x] No
* Running Antivirus [ ] Yes, Name [ ] or [x] No
* Internet Connection [x] DSL, [ ] CABLE, [ ] Other(specify)

hello,

i'm using flasfxp to connect to various debian-servers using sftp over ssh. works like a charm so far.
today i tried to send chown as a raw command to the server to change ownership of a file.
only return i got in log window: [R] chown 1000 /var/www/filename.php

i googled und stumbled upon the SITE command and tried it. result:
[R] SITE chown 1000 /var/www/filename.php

i've also tried: SITE "chown 1000 /var/www/filename.php" which did not work either.

i then connected with my command line sftp-client and sent chown 1000 /var/www/filename.php which worked without any problem.

i might be blind, but i have not found any switch in any options pane, and did not succeed in sending the chown command with flashfxp. is there a special trick? or is it just not possible?

if it's not possible with the current version i would like to file a feature request. would that be ok?

X3
08-10-2013, 05:41 AM
Welcome to forums.

Perhaps, along with some lasagne, you can ask for a feature enhancement around here (https://oss.azurewebsites.net/forum/tracker.php?do=new&tracker_projectid=4) I dont think SFTP raw commands are supported atm.

bigstar
08-10-2013, 08:31 AM
Currently we have not implemented a method of setting the owner/group via our user interface, but it's easy for us to add support via a raw command.

In my initial testing it seems that only chown by UID is supported though this may vary depending on the SFTP server software.

The new command will be executed using the following raw command.

Syntax: SITE CHOWN <uid>[:<gid>] <file>
Example: SITE CHOWN www-data:www-data "/var/www/FlashFXP example/"

If a field contains (or may contain) a space such as a path-name then the value must be double quoted.

Now if this is something you'd be interested in testing please let me know and I can send you a special build with experimental support, otherwise it will be included in the next public release.

P.S. I did something very similar awhile back to allow creating symbolic links. For those that aren't aware of this raw command command. Syntax: SITE SYMLINK <LinkPath> <TargetPath>