Operating System - HP-UX
1834479 Members
3344 Online
110067 Solutions
New Discussion

FTP - executable file permission

 
SOLVED
Go to solution
David Shore
Occasional Contributor

FTP - executable file permission

What is the umask setting to allow a file that is FTP'd to be executable?
Currently any file that is FTP'd to my HP UX 11.0 box is 664 (-rw-rw-r--)
2 REPLIES 2
Steven E. Protter
Exalted Contributor
Solution

Re: FTP - executable file permission

Yes:

Write a cron script that periodically checks permissions on the directory and changes them.

There is no way in Unix to have default executable permissions on a file without a second act allowing executable permissions.

The reasoning behind this is that the designers of Unix want a human being to think before granting such priviledges. This is for security reasons.

Having this happen automatically makes it to easy to upload damaging code to a server.

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
Graham Cameron_1
Honored Contributor

Re: FTP - executable file permission

If you are copying from another unix box, you can use tar or cpio with rcp to copy files, this will retain ownerships and permissions.
In some places, including here, rcp is forbidden, but rexec, which prompts for password, is ok.
Syntax, to copy files under somedir on source box, to destdir on destbox using account destdir, is
--
cd somedir
tar cf - .|rexec destbox -l destid "cd destdir;tar xvf -"
--
You will be asked for the password for destid. If you omit the "-l destid" you will be askd for the password for whatever id you are logged in as on the source box.
-- GRaham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.