Operating System - HP-UX
1755478 Members
4609 Online
108833 Solutions
New Discussion юеВ

Re: Ftp file from Windows 2003 to HP-UX server - permission

 
SOLVED
Go to solution
Joanne Keegan
Regular Advisor

Ftp file from Windows 2003 to HP-UX server - permission

Hi All,

Recently an application shifted from one of our HP-UX servers to a Windows 2003 server. Since the move, the files that are ftp'd across now have the incorrect permissions. The directory has it's permissions as 777, the umask value is 027. The file that is ftp'd across ends up with permissions set as 600.

I would like to file to have the permissions of at least 660 or 666. The shell setup for the user is /usr/bin/false, and is in the ftponly group. We are running HP-UX 11.00.

The chmod command doesn't work within ftp.

How do I get this to work? Is there a way of enabling the chmod command without opening the system up too widely security-wise?

Its a hassle having to modify the permissions by hand each time this file is transferred over.

Any suggestions will be welcomed.

Oh yes, I do award points!

Thanks,

Jo
9 REPLIES 9
Karthik S S
Honored Contributor

Re: Ftp file from Windows 2003 to HP-UX server - permission

Hi,

You can install proftp or wu-ftp on hp-ux which gives you chmod option thru configuration files,

http://hpux.connect.org.uk/hppd/hpux/Networking/FTP/proftpd-1.2.8/

http://www.proftpd.org/docs/configs/basic.conf

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Geoff Wild
Honored Contributor

Re: Ftp file from Windows 2003 to HP-UX server - permission

Use the umask command in ftp:

# ll somefile
-rw-r--r-- 1 root sys 590967 Nov 27 11:35 somefile


ftp> cd /tmp
250 CWD command successful.
ftp> umask 000
200 UMASK set to 000 (was 027)
ftp> put somefile
200 PORT command successful.
150 Opening BINARY mode data connection for somefile
226 Transfer complete.
590967 bytes sent in 0.10 seconds (5639.43 Kbytes/s)


On remote server:

cd /tmp
ll somefile
-rw-rw-rw- 1 root sys 590967 Nov 27 15:24 somefile

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Joanne Keegan
Regular Advisor

Re: Ftp file from Windows 2003 to HP-UX server - permission

Hi Geoff,

The unmask command doesn't work with ftp.

Is there a configuration file I need to change?

Regards,

Jo
James A. Donovan
Honored Contributor

Re: Ftp file from Windows 2003 to HP-UX server - permission

Assuming you are using the default ftpd server that comes with HP-UX, you can try creating/modifying the /etc/ftpd/ftpaccess file to use the upload directive.

There are a lot of options you have when using this file, so take a look at the man page and/or the HOW-TO's listed here.

http://www.wu-ftpd.org/HOWTO/

Remember, wherever you go, there you are...
system administrator_15
Frequent Advisor

Re: Ftp file from Windows 2003 to HP-UX server - permission

hi jo
i use samba to map a share and then you can set the permmission defaults so that any file created on that share is set that way you don't even need to use ftp just copy it.
it is also possible to set up what ever level of authority you reqiure so it is more secure than standard ftp.
regards
andy
Geoff Wild
Honored Contributor
Solution

Re: Ftp file from Windows 2003 to HP-UX server - permission

Ah....yes....no umask command in default Windows ftp client - that's a shame....

You are going to have to use a third party client - like WSFTP...

Then, after the transfer, right click the file and select "chmod"

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Volker Borowski
Honored Contributor

Re: Ftp file from Windows 2003 to HP-UX server - permission

Hi Jo,

actually UMASK is only a syntactical implementation of a FTPD-server feature.
So you do not need to have a client command within your ftp, but simply need to execute a server command. This is a clip from windows 98 (home pc) to HP-UX 11.0. The basic command to execute server commands is depending on the clients keyword for this.
Usually it is "quote" or "literal", which results in the following command being executed on the server. What you can execute on the server can be inspected with "remote help".

Hope this helps
Volker

Ftp> put c:\autoexec.bat /tmp/bastel
200 PORT command successful.
150 Opening ASCII mode data connection for /tmp/bastel.
226 Transfer complete.
Ftp: 134 Bytes gesendet in 0.00Sekunden 134000.00KB/Sek.

Ftp> literal site umask 000
200 UMASK set to 000 (was 027)

Ftp> put c:\autoexec.bat /tmp/bastel2
200 PORT command successful.
150 Opening ASCII mode data connection for /tmp/bastel2.
226 Transfer complete.
Ftp: 134 Bytes gesendet in 0.00Sekunden 134000.00KB/Sek.
Ftp>


-rw-r----- 1 root sys 131 Nov 29 10:14 bastel
-rw-rw-rw- 1 root sys 131 Nov 29 10:15 bastel2
Volker Borowski
Honored Contributor

Re: Ftp file from Windows 2003 to HP-UX server - permission

Forgot to enhance:
The above FTPD is 11.0 - 32 Bit standard FTPD !
Volker
Sanjay_6
Honored Contributor

Re: Ftp file from Windows 2003 to HP-UX server - permission

Hi Jo,

Try this link for more info.

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000065676995

You can set the umask globally using ftpd or set it using umask command when ftping file or you can set it in ftpaccess if you are using ftpaccess. Do man ftpaccess for more help if you are using ftpaccess.

Hope this helps.

Regds