1837542 Members
3313 Online
110117 Solutions
New Discussion

ftp umask not working

 
Bryan D. Quinn
Respected Contributor

ftp umask not working

Hello,

I have modified our /etc/inetd.conf to include the following at the end of the ftp entry:

-u 022

I then save the file and perform the following to reread the file:

/usr/sbin/inetd -c

I have done this using various umask settings and still, when I put a file on the box the permissions are always rw-rw-rw-.

Any ideas on what could be causing this or why the umask is not working?

I am at a loss here, but as usual I feel there is something obvious that I am missing.

Any help would be great.

Thanks,
Bryan
5 REPLIES 5
Cesare Salvioni
Trusted Contributor

Re: ftp umask not working

Hi
my answer sounds not so much clever to myself too but .. sometimes i noticed that inetd -c fails rereading correctly inetd.conf ... don't know really why, anyway changes where applied only restarting completely inetd with /sbin/init.d/inetd stop/start.

Did you try that?

As i told you i know my solution is a microsoft one, but it could be worth to try :-))

Hope this helps
Cesare Salvioni
Trusted Contributor

Re: ftp umask not working

Also if u r using ftp on 11i, try to use ftpaccess to configure the ftp server: whit htis file there is plenty of options, even for umasking

see link:
http://docs.hp.com/hpux/onlinedocs/B2355-90778/00/00/22-con.html

Hope this helps
Mel Burslan
Honored Contributor

Re: ftp umask not working

what cesare said has a valid point in it. to make the inetd re-read the configuration files, does not always work and it is a mystery to me when they do and when they don't. use

/usr/sbin/inetd -k # kill inetd
/usr/sbin/inetd -l # restart it with logging enabled, skip -l if you do not want logging

________________________________
UNIX because I majored in cryptology...
Con O'Kelly
Honored Contributor

Re: ftp umask not working

Hi Bryan

As others have said maybe inetd is not re-reading the configuration. But default umask for ftp is 027 so doesn't really explain the rw-rw-rw- permissions.

One thing that occured to me is that maybe its being overridden by an entry in /etc/ftpd/ftpaccess file if you are using this file. Just a thought....

Whats the entry for ftpd in inetd.conf??

Cheers
Con
Bryan D. Quinn
Respected Contributor

Re: ftp umask not working

Sorry, I got to working on some other stuff and forgot about checking on this post.

Con,
Here is what the entry in my inetd.conf looks like:

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -u 022

As for the re-read of inetd...that could be. I will test it and see if that is the case.

Thanks,
-Bryan