Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission codes using FTP - keeping Permissions on files sendt

Status
Not open for further replies.

Larshg

Programmer
Mar 1, 2001
187
DK
Hi

I'm using ftp to send file to another server - my problem is that I would like NOT to have the permission codes for the files changede

I using this script

#!/bin/ksh
user="nmsuser"
pswd="o&moper1"

ftp -inv $1 <<END
user $user $pswd
ascii
cd $dir
send $2
bye
END

throu the firewall the only thing open is FTP between the 2 servere.


Thanks

Larshg
 
If you know the permissions of the file, you can add this line in your ftp script, after the send:
chmod mode $2

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
I don't

Is there any way to get the numbers from the original file?

Larshg
 
As far as I know, these permissions are handled by the setup of the server.
If 'root' on 'miniClient' sends file, they shall not be owned by 'root' from 'bigServer'.
And if a file is marked to be executable for 'other' on miniClient, shall they be executable for anybody on bigServer?

And if you create user 'Eric' on the client, and 'Eric' on the server, they may, or may not have the same 'UID'. Normally they will have the same uid only by random.

Often ftp is performed crossing platforms, so permissions might not exist - or not exist in the same way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top