AIX 5.1 -- Change default file permissions for FTP uploaded files

How can I change the default file permissions on files uploaded via FTP to a AIX 5.1 box?

Who is Participating?
woolmilkporcConnect With a Mentor Commented:

this can be done using the "-u" (umask) option of ftpd

Edit /etc/inetd.conf, find the line containing

ftp     stream  tcp6    nowait  root    /usr/sbin/ftpd         ftpd

and change it to e.g.

ftp     stream  tcp6    nowait  root    /usr/sbin/ftpd         ftpd -u 027

Restart inetd with

refresh -s inetd

and that's it.

-u works just like the standard Unix umask - the value given is subtracted from "666" for files or "777" for directories to form the final file permissions. "027", which is the default, will thus result in file permissions rw-r----- (640).


XetroximynAuthor Commented:
Thanks wmp -- as always, you are the man!

will the refresh -s inetd reset telnet sessions or anything like that?  basically -- should I wait until there is not production stuff running before doing the refresh?

All sessions will remain running.

When using refresh the inetd (the parent of these sessions) will not be killed, but only forced to re-read its configuration.
This means, however, that an existing session (e.g. a running ftpd) will not notice the configuration change.
You will have to terminate your ftp session and restart it in order for the change to take effect.

XetroximynAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.