Re: files losing execute permissions when transferred with ftp (103 Views)
Reply
Honored Contributor
Norm Diederich
Posts: 789
Registered: ‎12-11-2001
Message 1 of 8 (103 Views)
Accepted Solution

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
Honored Contributor
Yogeeraj_1
Posts: 4,613
Registered: ‎11-25-2001
Message 2 of 8 (103 Views)

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)
Honored Contributor
Patrick Wallek
Posts: 13,784
Registered: ‎06-21-2000
Message 3 of 8 (103 Views)

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.

Honored Contributor
Bill Hassell
Posts: 14,217
Registered: ‎05-29-2000
Message 4 of 8 (103 Views)

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.
Acclaimed Contributor
Dennis Handly
Posts: 25,274
Registered: ‎03-06-2006
Message 5 of 8 (103 Views)

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
Honored Contributor
Norm Diederich
Posts: 789
Registered: ‎12-11-2001
Message 6 of 8 (103 Views)

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

Acclaimed Contributor
Dennis Handly
Posts: 25,274
Registered: ‎03-06-2006
Message 7 of 8 (103 Views)

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
Honored Contributor
Norm Diederich
Posts: 789
Registered: ‎12-11-2001
Message 8 of 8 (103 Views)

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
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.