Topic "Change permissions and SFTP"

Author Message
scottrell
[View user's profile]

Joined: 2007-09-28
Posts: 1
Location: Minneapolis
We have a problem when using the SFTP (transfer) protocol and creating/changing permissions on directories. The base permissions on the directories are (octal) 2775. When a new subdirectory is created, it cannot set the "Set GID" permission on the new directory, although the owner:group is set correctly.

Creating a new directory within this subdirectory therefore sets the ownership as owner:owner, which is not what we want.

When creating these directories, I have used the "More >>" button to test all kinds of variations to enable the Set GID bit, but it will not do it. I have also tried several combinations on the Properties of the new folder, and cannot set the Set GID bit.

From the command line (within the SFTP session, not a shell), the command "chmod 2775 testfolder" results in the following error:
Current SFTP-3 session does not support command you request. Separate shell session may be opened to process the command. Do you want to open separate shell session?

The shell session is able to run the command and set the permissions properly.

Likewise, when using the SCP (transfer) protocol, everything works properly from the beginning--new directories are created with octal 2775. (the session protocol in all instances is SSH-2)

Yet, it appears we should be able to change the permissions based on the "Capabilities" of the SFTP transfer protocol.

What are we missing to get this to function as expected with SFTP?

Thank you
-sc

WinSCP v4.0.4 build 346
--------------------------
Session protocol = SSH-2
SSH implementation = OpenSSH_3.4p1
Encryption algorithm = aes
Compression = No
File transfer protocol = SFTP-3
Can change permissions = Yes
Can change owner/group = No
Can execute arbitrary command = No
Can create symlink/hardlink = Yes/No
Can lookup user groups = No
Can duplicate remote files = No
Can check available space = No
Can calculate file checksum = No
Native text (ASCII) mode transfers = No
------------------------------------------------------------
Additional information
The server does not support any SFTP extension.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
scottrell wrote:
We have a problem when using the SFTP (transfer) protocol and creating/changing permissions on directories. The base permissions on the directories are (octal) 2775. When a new subdirectory is created, it cannot set the "Set GID" permission on the new directory, although the owner:group is set correctly.

This is typically problem of the SFTP server. I believe that WinSCP issues the command properly.

Quote:
From the command line (within the SFTP session, not a shell), the command "chmod 2775 testfolder" results in the following error:
Current SFTP-3 session does not support command you request. Separate shell session may be opened to process the command. Do you want to open separate shell session?

Is the command issued exactly as you've posted? Because "chmod" command should never result in that error. What version of WinSCP are you using?
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License