Index: /branches/eam_branches/20090715/DataStore/scripts/dsget
===================================================================
--- /branches/eam_branches/20090715/DataStore/scripts/dsget	(revision 25396)
+++ /branches/eam_branches/20090715/DataStore/scripts/dsget	(revision 25397)
@@ -69,5 +69,5 @@
         undef $copies;
     }
-    if ($copies < 1) {
+    elsif ($copies < 1) {
         die "--copies must be >= 1";
     }
@@ -214,4 +214,7 @@
     $tmp->flush or die "can't flush filehandle: $!";
     $tmp->sync or die "can't sync filehandle: $!";
+    # set read and write permissions based on umask (ignore other bits)
+    my $umask = umask;
+    chmod 0666 ^ $umask, $tmpfilename or die "failed to chmod $tmpfilename";
     rename $tmpfilename, $filename
         or die "renaming $tmpfilename to $filename failed: $!";
