Thanks for all the quick responses:
Drexx Laggui <email@example.com>
David Thorburn-Gundlach <firstname.lastname@example.org>
Jafar Shameem <Jafar.Shameem@East.Sun.COM>
Christophe Colle <email@example.com>
Steve Allen <firstname.lastname@example.org>
Brian Sherwood <email@example.com>
> Is it possible use an ftp client to change the mode of a remote file?
To clarify: I was not interested in changing the default file creation mode
(the umask) of the client-side ftpd. Instead, I was just intersted in
changing the mode of a few files--adding execute permissions on some, taking
away write permission on some directories, adding write permissions on some
I found out that the ftp client on our DEC OSF/1 V3.2 machines had an
option 'site chmod' which did just what I wanted:
ftp> site help
214-The following SITE commands are recognized (* =>'s unimplemented).
UMASK CHMOD GROUP NEWER INDEX ALIAS GROUPS
IDLE HELP GPASS MINFO EXEC CDPATH
I did not find this 'site' option on our SunOS 4.x or Solaris 2.x machines:
ftp> site help
-- Karl Amrhein firstname.lastname@example.org
I wish it were. You probably want to do that because all files you drop in place (or directories you make) are world-writable, right? That's because the in.ftpd is run by a process which has no umask (I forget how it all gets kicked off, but I think that this has appeared before as a summay...). You can set the umask in a /etc/rc?.d/S00umask.sh script (the .sh means that it will get sourced by the calling shell and thus passed on to following shells) so that this isn't a problem...
The file permission modes of the ftp-downloaded files are inherited from the umask setting of the client-side user. So yes, the file modes can be changed that way. Not unless you wanna use the -p option of FTP.
Hope this helps,
Drexx Laggui <email@example.com> Senior Systems Engineer
on the ftp prompt while connected to the site, type: ftp> quote site chmod <mode> <filename> for example:
ftp> quote site chmod 777 /tmp/test
the site command should be implemented on the ftp server though, i think.
Sure you can, but your ftpd should allow it. wu-ftpd allows you to change the file permission (if you explicitely enable the feature). You can use any unix client. You should execute the command: quote site chmod 777 file....
I hope this helps
The man page for ftpd on most systems contains a very nice summary of the FTP protocol, and a reference to the RFC which defines it. It's a very old protocol, not specific to Unix.
Some ftp clients and servers may support the SITE command, which syntax you can see in the alpha man page for ftpd. In the case of the alpha software it does permit "site umask nnn"
-- Steve Allen UCO/Lick Observatory Santa Cruz, CA 95064
I have not been able to find a way. (I briefly scanned the source code for a ftpd server)
It appears that the file creation mode is controled by the UMASK of the process running ftpd.
-- Karl Amrhein
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:11 CDT