Operating System - Tru64 Unix
1832679 Members
2759 Online
110043 Solutions
New Discussion

ftp file permissions

 
SOLVED
Go to solution
Terrance_2
Occasional Advisor

ftp file permissions

How to ftp files from serverA to serverB with destination file permission as rw-rw-r for a particular user(namely user1).
OS - Tru64 V4.0D

8 REPLIES 8
Michael Schulte zur Sur
Honored Contributor
Solution

Re: ftp file permissions

Hi,

you could check on man ftpd.
There is a site command which may support setting of umask from the clients side.

greetings,

Michael
Terrance_2
Occasional Advisor

Re: ftp file permissions

Thanks Micheal,

Other than site umask do we have any other option?
Terrance_2
Occasional Advisor

Re: ftp file permissions

Hi,

One more help. will ftp changes permissions of file when transfered?

Thanks,
Terrance_2
Occasional Advisor

Re: ftp file permissions

Hi,

One more help. will ftp changes permissions of file when transfered by default?

Thanks,
Michael Schulte zur Sur
Honored Contributor

Re: ftp file permissions

Hi,

besides using a third party ftp server you could write a macro and store it in .netrc
machine xxx
login yyy
password zzz
macdef init
site umask 002

one line has to be empty to terminate the macro

greetings,

Michael
Terrance_2
Occasional Advisor

Re: ftp file permissions

Hi Micheal,

Tried your options but site umask is not working thru macro.

little more specific my requirement is - user name user1 from different servers transfer files to serverA and user user2 need wirte permissions to those files which are sent by user1. Both user1 and user2 are in same group - transfer. But the files transferred using ftp with any permissions is changing to rw-r--r-- and the group doesn't have write permission. Since the files are transferred from multiple server across the globe cannot use site umask while transferring files.
Is it possible to find out on serverA which file is used to change the permissions to rw-r--r-- and possible to change to rw-rw-r

Many thanks,
Michael Schulte zur Sur
Honored Contributor

Re: ftp file permissions

Terrance,

I hope, you understand that the .netrc belongs on the side of the client. What error do you get or why do you think, it does not work? Another way could be the site chmod command after a put.

Michael
Aco Blazeski
Regular Advisor

Re: ftp file permissions

Hi Terrance,

I had similar issue between Solaris and Tru64 5.1A.

Namely, ftpd server on Tru64 5.1A support site command (man ftpd).

So in your case if you have problem with the macro given above in this forum, then you should check:

1. if ftpd in tru64 4.0D supports site mask command
2. if the ftp client that you are using has implemented site command (i.e. if you can't send site command from client, no use of server which has that feature).

If 1. is negative, then you should consider instaling some more flexibile ftp server
If 2. is negative (like in my case) then you should find some client that supports site command and scripting (for example lftp).

Hope find this helpful,

Regards,
Aco