Observe the output of the following:
mkdir -p a/b/c/d
touch a/b/c/d/bar.txt
chmod -R -w a
cp -r a b
uutils-cp -r a c
tree -p a b c
All directories under a and including itself (i.e. a, b, c, d) now has permission 555. (coreutils) cp -r respects readonly flags on directories, thus each subdirectory in this tree b/b/c/d also has permission 555, the same as source a, but each subdirectory in the uutils-cped tree c/b/c/d now has permission 755.
Another observable deviation is that, cp -a a b works as expected, but uutils-cp -a a b will raise permission denied error.
Observe the output of the following:
All directories under
aand including itself (i.e.a,b,c,d) now has permission 555. (coreutils)cp -rrespects readonly flags on directories, thus each subdirectory in this treeb/b/c/dalso has permission 555, the same as sourcea, but each subdirectory in theuutils-cped treec/b/c/dnow has permission 755.Another observable deviation is that,
cp -a a bworks as expected, butuutils-cp -a a bwill raise permission denied error.