1834725 Members
2262 Online
110069 Solutions
New Discussion

Re: sftp chmod question

 
Shabu Khan-2
Frequent Advisor

sftp chmod question


Hi All,
One of my user has an issue with running chmod at the sftp prompt and he unable to change permissions to a file, I tried to test it and I get the same error ...
Here is the version and the OS.
Both client and server are running
HP-UX 11.11
F-Secure SSH 3.3.0 (build 14) on hppa2.0w-hp-hpux11.00

This the file(I ran it in debug mode - sftp -v guest@shaahid):
sftp> ls -l
-rw-r--r-- 1 guest users 15 Jun 1 10:48 test
sftp> ls -l
Sftp2/sftp2.c:841: Command descriptor 0xb (0xb)
Sftp2/sftp2.c:2188: ls: starting glob.
SshFCGlob/sshfc_glob.c:561: Starting globbing, file_list has 1 entries.
SshFCGlob/sshfc_glob.c:326: orig_filename = ./*
SshFCGlob/sshfc_glob.c:490: Starting glob of ./*...
SshFCRecurse/sshfc_recurse.c:278: File ``.'' is "raw", and it needs to be parsed.
SshFCGlob/sshfc_glob.c:179: Accepting file ``./ar.FDC-Ext.20070520.output.error''.
SshFCGlob/sshfc_glob.c:179: Accepting file ``./test''.
SshFCRecurse/sshfc_recurse.c:184: Received error `EOF' (1).
Sftp2/sftp2.c:2159: Operation complete.

.:
---------- 1 guest users 15 Jun 1 10:48 test

Whats up with that?

Is there some directive in ssh2_config or sshd2_config that we could tweak to enable the user to use 'chmod'?
This happens only with F-Secure's client version of sftp, I tried it with OpenSSH's sftp client and it works fine.

Any thoughts?

Thanks,
Shabu
3 REPLIES 3
Shabu Khan-2
Frequent Advisor

Re: sftp chmod question

I missed the 'chmod' step (after the first ls -l):

sftp> chmod 700 test
Sftp2/sftp2.c:841: Command descriptor 0xc9 (0xc9)
Sftp2/sftp2.c:1386: Chmod settings: 0
Sftp2/sftp2.c:1390: Adding ./test to file list.
SshFCGlob/sshfc_glob.c:561: Starting globbing, file_list has 1 entries.
SshFCGlob/sshfc_glob.c:326: orig_filename = ./test
SshFCGlob/sshfc_glob.c:416: basedir: ., file: test
SshFCMisc/sshfc_misc.c:147: CHMOD LOOP: . 1073907440 1 1 (not changed)
SshFCMisc/sshfc_misc.c:147: CHMOD LOOP: test 1073909168 0 1
SshFCMisc/sshfc_misc.c:74: CHMOD FILE: ././test
SshFCMisc/sshfc_misc.c:147: CHMOD LOOP: . 1073907440 1 0 (not changed)
SshFCMisc/sshfc_misc.c:137: Done with chmod, 0 errors - returning

Thanks,
Shabu
Tony Berry
Valued Contributor

Re: sftp chmod question

Since the problem isn't happening with the standard SSH/SFTP client, I would start pointing fingers at F-Secure's implementation or possibly configuration options. I'm sure you already figured that out though. I was mainly responding to let you know that we do the same thing using Reflections X SFTP client and it works fine. I hope that information helps in your testing.
Unix is boss.
Shabu Khan-2
Frequent Advisor

Re: sftp chmod question

Thanks Tony.
I haven't figured it out yet on which directive in the ssh2_config would affect this but I am researching that currently, unforuntately my user uses F-Secure's sftp client through an automated process to put/get files. We've a few other options to get around his current issue one of them being to use OpenSSH's sftp client and the other option is to use PowerBroker to later change the permissions of the file after he sftp's his file since this is a sftp/scp only shell, we use PB extensively on all our PCI/SOX servers and we can setup him up to use pbrun to change permissions.

But I would like to know what config changes is needed to make chmod behave with F-Secure.

Thanks,
Shabu