in reply to Re: Net::FTP::Recursive Permission and Ownership...
in thread Net::FTP::Recursive Permission and Ownership...

The general idea here is that the group I am currently in is being dumped on to push application code. I am working on some scripts to allow another group to actually perform this code push.

Currently the process is to tar | remsh to files to each remote system. This requires root access, and some knowledge. I am trying to script an idiot proof method of performing this same thing. I am trying to use the Net::FTP::Recursive module to get the files over. I am beginning to wonder though if I my be better served in simply making a 'system' call to do the same tar|remsh method that we currently do. I have been trying to avoid this because I thought the ftp method would be more secure and possibly faster too.

Once again, any suggestions/ideas are most appreciated. Thanks.

  • Comment on Re: Re: Net::FTP::Recursive Permission and Ownership...

Replies are listed 'Best First'.
Re: Re: Re: Net::FTP::Recursive Permission and Ownership...
by insensate (Hermit) on Apr 08, 2004 at 14:07 UTC
    I don't see why the process you describe requires root access... I think Net:FTP::Recursive is the perfect tool. If you have the access to do the remsh (I assume now you're on HP-UX) you should have the same access to the account you want owning the files on the remote system(s). As for changing the file permissions, that can be a simple script after you put the files out... using Net:SSH would be ideal. Avoid chmod -R though for obvious security reasons... I would instead build a list of files... maybe with the File::Find modules so you can chmod specific filenames/directories.
    use File::Find; sub process_file { push @files, $File::Find::name unless (-d); push @dirs, $File::Find::name if (-d) } find( \&process_file, "your src dir" );