Operating System - HP-UX
1748000 Members
4902 Online
108756 Solutions
New Discussion юеВ

Re: files losing execute permissions when transferred with ftp

 
SOLVED
Go to solution
Norm Diederich
Honored Contributor

files losing execute permissions when transferred with ftp

When trying to copy the contents of an Unix install CDROM (NNM 7.51) loaded in a PC to an HP-UX Server, I am losing the execute permissions on the executables and scripts.

What do I need to do to retain the original permissions?

Thanks,
Norm
7 REPLIES 7
Yogeeraj_1
Honored Contributor

Re: files losing execute permissions when transferred with ftp

hi,

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

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.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Patrick Wallek
Honored Contributor

Re: files losing execute permissions when transferred with ftp

FTP will never carry the permissions over from the source to the destination. It is not that smart.

If you need to keep the permissions as they are on the CD, you need to look into some other method to transfer the files.

You could try creating a large zip file on the PC, tranfer it to your Unix server and then unzip it.

Bill Hassell
Honored Contributor
Solution

Re: files losing execute permissions when transferred with ftp

Files are never created with execute permissions. This is true for vi, touch, etc. It doesn't matter what umask you use, no file starts life with execute, nor do you want that behavior. It is a safety and stability issue. Assigning execute permission to random files is asking for trouble. So ftp won't work. Also, copying the files will likely not result in a usable fileset as the format of the CD is specific for CD-based installs.

I assume that the HP-UX server was not ordered with a CD/DVD player, thus the reason for the PC source. About the only way to do this is to make an ISO image of the CD on your PC, then ftp the result to your server. You should then be able to mount the local ISO image on the HP-UX system.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: files losing execute permissions when transferred with ftp

>Bill: Files are never created with execute permissions.

Just about the only exceptions are mkdir and ld.

>So ftp won't work.

ftp has a chmod command, if not using mput.
You can also use a script to get and set the original permissions/owner.
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1215123
Norm Diederich
Honored Contributor

Re: files losing execute permissions when transferred with ftp

I was trying to do an install on a remote system.

I guess I will need to do something else to copy the CD Image.

Thanks,
Norm

Dennis Handly
Acclaimed Contributor

Re: files losing execute permissions when transferred with ftp

>HP-UX install CDROM NNM 7.51

It seems strange this just isn't one SD depot file. What installation instructions were given?
Nothing as simple as: swinstall -s /cdrom
Norm Diederich
Honored Contributor

Re: files losing execute permissions when transferred with ftp

Dennis,

This uses an install script and has multiple depots.

There are a lot of files and directories that need to be moved. It looks like moving the iso image may be the best bet for remote installs.

Regards,
Norm