1829107 Members
2725 Online
109986 Solutions
New Discussion

ftp and file permissions

 
Anil_5
Advisor

ftp and file permissions

Hi,
When I FTP a file over to a HP-Ux 11.0 machine even though the umask is set to 022(644)rw-r-r the file which got ftped over gets only rw-r-

Is there a way to ftp files over from windows and still get the permissions of the umask for the user.
Is there any setting in the ftp server on the unix machine which can change this?

webapp
2 REPLIES 2
Uday_S_Ankolekar
Honored Contributor

Re: ftp and file permissions

Helen French
Honored Contributor

Re: ftp and file permissions

Anil,

You have two alternate ways to change ftp file permissions:

1) You can make the change globally for the ftp service by editing
the /etc/inetd.conf file:

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -uxxx
Note: Where xxx would be the umask that you select.

After any change to the /etc/inetd.conf file, inetd must
re-read the new inetd.conf file:

inetd -c <-- make inetd re-read the inetd.conf file.

-OR-

2) Use the umask command while the ftp session is active. This will
only affect the current session for the user connection.

ftp> umask # current mask
200 Current UMASK is 777

ftp> umask 027 # change to new mask
200 UMASK set to 027 (was 777)

ftp> umask # verify new mask
200 Current UMASK is 027

HTH,
Shiju
Life is a promise, fulfill it!