How to change default umask for ftp upload files
This article explains how to configure HP-UX 11i Operating Environment FTP Server to a custom default umask for upload file.
Most FTP deployments default to 640 permission umask when uploading files to effectively prevent world wide users to be able to access someone else files. Nonetheless, sometimes it may be necessary for to share this information with any other user on the system.
This procedure explains how to setup the permission umask for a specific user and directory.
In the following example, how to accomplish this for a user account named user1 and a default directory called /home/user1/subdir is explain.
1. Add the upload line to /etc/ftpd/ftpaccess configuration file.
upload /home/user1 /home/user1/subdir yes user1 users 0666 dirs
To prevent "Access denied" errors, make sure you have at least the class entry. The ftpaccess configuration file should be similar to:
NOTE: class all real *
compress yes all tar yes all
log commands real log transfers anonymous,real inbound,outboundupload /home/user1 /home/user1/sub yes user1 users 0666 dirs
# grep user1 /etc/passwd user1:a5xEYGzeQ:123:20::/home/user1:/sbin/sh
2. Add -a option to the ftp entry in the /etc/inetd.conf configuration file.
#grep ^ftp /etc/inetd.conf ftp stream tcp6 nowait root /usr/lbin/ftpd ftpd -l -a
3. Restart inetd daemon.
# inetd -c