1#!/bin/sh 2# $FreeBSD: src/tools/regression/fstest/tests/rmdir/08.t,v 1.1 2007/01/17 01:42:11 pjd Exp $ 3 4desc="rmdir returns EACCES when write permission is denied on the directory containing the link to be removed" 5 6n0=`namegen` 7n1=`namegen` 8n2=`namegen` 9 10expect 0 mkdir ${n0} 0755 11cdir=`pwd` 12cd ${n0} 13expect 0 mkdir ${n1} 0755 14expect 0 chown ${n1} 65534 65534 15expect 0 -u 65534 -g 65534 mkdir ${n1}/${n2} 0755 16expect 0 chmod ${n1} 0555 17expect EACCES -u 65534 -g 65534 rmdir ${n1}/${n2} 18expect 0 chmod ${n1} 0755 19expect 0 -u 65534 -g 65534 rmdir ${n1}/${n2} 20expect 0 rmdir ${n1} 21cd ${cdir} 22expect 0 rmdir ${n0} 23