Topic "setgid bit always unset when changing file permissions"

Author Message
berthierp
[View user's profile]

Joined: 08 Apr 2010
Posts: 3
My Setup:
WinSCP 4.2.7 build 758 Running on Windows XP SP3.
SFTP session.

I am using directories with setgid bit set. I want to change the permissions of newly created directories to give write permission to the group (by default they have not). For this I right-click on the directory and change the permissions from the Properties dialog.

When I change the permissions of a directory that way, the setgid bit gets removed. In fact, there is no way to set the setgid bit, it just always gets turned off, whatever operation one does on permissions.

I have found a workaround by creating a custom command that executes chmod -R g+w "!" and applies on directories. This works fine.
Advertisements
prikryl
[View user's profile]
Site Admin
Joined: 10 Dec 2002
Posts: 19541
Location: Prague, Czech republic
It is possible that your SFTP server does not support the setgit bit and silently ignores the request to set it.
_________________
Martin Prikryl
berthierp
[View user's profile]

Joined: 08 Apr 2010
Posts: 3
prikryl wrote:
It is possible that your SFTP server does not support the setgit bit and silently ignores the request to set it.


I believe our server supports that bit very well, because we use that feature for years now (running Suse enterprise / openSuse).

Apparently does not ignore the request because the bit gets unset every time that I change any other permissions using WinSCP. If the bit was set, it gets unset, and if the bit was not set, no change. My thought was that WinSCP would force the bit to unset every time.
prikryl
[View user's profile]
Site Admin
Joined: 10 Dec 2002
Posts: 19541
Location: Prague, Czech republic
berthierp wrote:
I believe our server supports that bit very well, because we use that feature for years now (running Suse enterprise / openSuse).

I believe your server OS does, but your SFTP server does not.

Quote:
Apparently does not ignore the request because the bit gets unset every time that I change any other permissions using WinSCP. If the bit was set, it gets unset, and if the bit was not set, no change. My thought was that WinSCP would force the bit to unset every time.

It does not.
_________________
Martin Prikryl
berthierp
[View user's profile]

Joined: 08 Apr 2010
Posts: 3
prikryl wrote:
berthierp wrote:
I believe our server supports that bit very well, because we use that feature for years now (running Suse enterprise / openSuse).

I believe your server OS does, but your SFTP server does not.


Yes you are right, we were using a openssh 4.6 server, which is know to have this Bug ( https://bugzilla.mindrot.org/show_bug.cgi?id=1310 ). Using another openssh version 5.2 fixes the problem (apparently it has been fixed in 5.1).

Thanks for the help!
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