- rm -rf $DIR/d0
- mkdir $DIR/d0
-
- chown $USER0 $DIR/d0 || error "chown (1)"
- $RUNAS -u $ID0 ls $DIR || error "ls (2)"
- $RUNAS -u $ID0 touch $DIR/f0 && error "touch (3)"
- $RUNAS -u $ID0 touch $DIR/d0/f1 || error "touch (4)"
- $RUNAS -u $ID1 touch $DIR/d0/f2 && error "touch (5)"
- touch $DIR/d0/f3 || error "touch (6)"
- chown root $DIR/d0 || error "chown (7)"
- chgrp $USER0 $DIR/d0 || error "chgrp (8)"
- chmod 775 $DIR/d0 || error "chmod (9)"
- $RUNAS -u $ID0 touch $DIR/d0/f4 || error "touch (10)"
- $RUNAS -u $ID1 touch $DIR/d0/f5 && error "touch (11)"
- touch $DIR/d0/f6 || error "touch (12)"
-
- rm -rf $DIR/d0
+ umask 0022
+
+ chmod 0755 $DIR || error "chmod (1)"
+ rm -rf $DIR/$tdir || error "rm (1)"
+ mkdir -p $DIR/$tdir || error "mkdir (1)"
+
+ if [ "$CLIENT_TYPE" = "remote" ]; then
+ do_facet $SINGLEMDS "echo '* 0 normtown' > $PERM_CONF"
+ do_facet $SINGLEMDS "lctl set_param -n $IDENTITY_FLUSH=-1"
+ chown $USER0 $DIR/$tdir && error "chown (1)"
+ do_facet $SINGLEMDS "echo '* 0 rmtown' > $PERM_CONF"
+ do_facet $SINGLEMDS "lctl set_param -n $IDENTITY_FLUSH=-1"
+ else
+ chown $USER0 $DIR/$tdir || error "chown (2)"
+ fi
+
+ $RUNAS -u $ID0 ls $DIR || error "ls (1)"
+ rm -f $DIR/f0 || error "rm (2)"
+ $RUNAS -u $ID0 touch $DIR/f0 && error "touch (1)"
+ $RUNAS -u $ID0 touch $DIR/$tdir/f1 || error "touch (2)"
+ $RUNAS -u $ID1 touch $DIR/$tdir/f2 && error "touch (3)"
+ touch $DIR/$tdir/f3 || error "touch (4)"
+ chown root $DIR/$tdir || error "chown (3)"
+ chgrp $USER0 $DIR/$tdir || error "chgrp (1)"
+ chmod 0775 $DIR/$tdir || error "chmod (2)"
+ $RUNAS -u $ID0 touch $DIR/$tdir/f4 || error "touch (5)"
+ $RUNAS -u $ID1 touch $DIR/$tdir/f5 && error "touch (6)"
+ touch $DIR/$tdir/f6 || error "touch (7)"
+ rm -rf $DIR/$tdir || error "rm (3)"
+
+ if [ "$CLIENT_TYPE" = "remote" ]; then
+ do_facet $SINGLEMDS "rm -f $PERM_CONF"
+ do_facet $SINGLEMDS "lctl set_param -n $IDENTITY_FLUSH=-1"
+ fi