[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] OT: FTP from Command line



> Ligard, Vidar wrote:
> 
> >>Greetings!
> >>
> >>I have a shell script on my RaQ4 that FTP's a bunch of files 
> >>to another 
> >>server like this:
> >>
> >>------------------------
> >>d=$(date +%Y-%m-%d)
> >>
> >>ftp -i ftp.server.tld <<**
> >>cd /mydirname
> >>mkdir $d
> >>chmod 600 $d
> >>cd $d
> >>binary
> >>mput *
> >>ls -x1A
> >>bye
> >>**
> >>------------------------
> >>
> >>I need it to also chmod the files that it transfers to 600 
> >>but I can't seem 
> >>to get that to work.

I'm not into much shell scripting but doesn't this change the
permissions of the directory before you put the file in it?

Paul.

> > 
> > 
> > Looks like your chmod command is setting permissions on the 
> directory, not the files themselves
> > -Vidar
> > 
> 
> how about a
> chmod -R 600 %d/*
> recursively sets the contents of directory $d to 600 (or get rid of the 
> -R)...
> 
> 
> Regards.
> 
> _____________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To subscribe/unsubscribe, or to SEARCH THE ARCHIVES, go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
> 
>