1834095 Members
2186 Online
110063 Solutions
New Discussion

FTP & umask

 
SOLVED
Go to solution
Jagadesh_2
Regular Advisor

FTP & umask


We have a scenario like

we have two users (user1 & user2) in a system system1 (tru64 server)
Users will be using user1 for ftping some files to system1. User2 needs to have write access to all the files residing under user1 home dir.

I ve tried putting the users in the same group.. that is also not working.. even ftp will not use the .profile.. so umask is also not possible.

How to do the same?
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: FTP & umask

So long as you are not trying to have execute permissions, ftp should respect the default umask in /etc/profile.

If I'm wrong, and I probably am, then it should be set up in the ftpaccess file. That is a configuration file that comes with the Washington University wu-ftpd server, which is the standard one that ships with HP-UX.

You should also check your permission on the home directories, because normally users do not have write access to files in other users home directory.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: FTP & umask

I don't like this approach because it decreases security but since ftpd is spawned by inetd which is spawned by rc, the change should be in the /sbin/rc script. You can set the umask there (at least on HP-UX boxes). Tru64 should be similar.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: FTP & umask

Plan B. Write a small cron job that periodically (every 10 minutes or so) does a chmod on the files in this directory that need it.
If it ain't broke, I can fix that.
Raimo Lesonen_1
Advisor
Solution

Re: FTP & umask

You can set umask for ftp in /etc/inetd.conf.
Just add for example "-u 007" at the end of line ftp. Then give command inetd -C.

Hope this helps.