Operating System - HP-UX
1836596 Members
1584 Online
110102 Solutions
New Discussion

Re: ftp file permission get changed

 
laxmikant
New Member

ftp file permission get changed

hi friends ,
when a file is being ftped from client on windows nt to the server on hp unix it permission is 640 when the mask set in /etc/inetd.config is 006.ideally the permission should be 660 as the mak is 006.
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: ftp file permission get changed

This controlled in either the ftpaccess file or the umask for the user. Since no profile is being used for ftp, it must be the ftpaccess file.

As i remember it, this is done in ftpaccess with umask just like you'd do it in the .profile file.

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
Rajeev  Shukla
Honored Contributor

Re: ftp file permission get changed

By default the umask is 027 so when you ftp any files they will be created with a permission of 640, you can override this with -u option in /etc/inetd.conf file in ftpd line to what ever you want. Say a umask of 006 will give you a file with 660 permission

And the permission to change the umask is controlled by the file called /etc/ftpd/ftpaccess where umask yes|no typelist
where typelist is a comma-separated list of any of the keywords
anonymous, guest and real

Have a look at man pages of ftpaccess for more details.

Cheers
Rajeev
twang
Honored Contributor

Re: ftp file permission get changed

As I remember by default, the umask value is 027.
To establish a global 'umask' for 'ftp' add the '-u umask' argument to the daemon's startup in 'etc/inetd.conf':

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

Then, restart the 'inetd' daemon:

# /usr/sbin/inetd -c

To establish a 'umask' on a specific base case, use the 'etc/ftpdftpaccess' mechanism. See the man pages for 'ftpaccess(4)' for more information.