Forum Moderators: bakedjake
Modes may be absolute or symbolic. An absolute mode is an octal number constructed from the sum of one or more of the following values:
.....
2000 (the setgid bit). Executable files with this bit set will run with effective gid set to the gid of the file owner.
Setgid on a directory may depend on what flavour of Unix you're using. Usually it sets the group of new files created in that directory to the group of the directory (instead of the user's primary group).
For FreeBSD:
[freebsd.org...]
For a file, a 2 in the leftmost position makes a binary execute setgid (as the group id of the file), a 4 in the leftmost position makes a binary execute setuid (as the group id of the file), and a 1 in the leftmost position sets the sticky flag.
So a file with mode 2750 is -rwxr-s---
Yes, ftp's chmod should allow you to setgid a file.
See also the chmod(1) manpage.
You don't want other to view the contents of the directory.
You *especially* don't want to set the other execute bit for binaries, except for special utilities like sudo. Easy priviledge escalation there if a flaw is ever found.
Why not just do chmod 755, ie -rwxr-xr-x? Seems simpler.
Some of you say that I can do this via ftp, some that I can't -? I'm using WSFTP and in any case, can not find where I'd set this left-most digit.
Use the command line ftp, not a GUI:
Start -> Run
Type in "ftp.exe"
You'll get a DOS box with an ftp> prompt
open <the.hostname.example.com>
Then your user and password.
Type "help", if you see "chmod" then you have chmod ability on the server via ftp. If not you'll have to ask the server admin to either enable it, or you'll have to use a shell to do it.
If you see chmod,
cd /to/the/right/path
chmod 2750 your_directory