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?

XetroximynAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
Hi,

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).

wmp


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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?


0
woolmilkporcCommented:
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.

wmp
0
XetroximynAuthor Commented:
Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
OS Security

From novice to tech pro — start learning today.