-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
cp behaves differently on read-only directories #7961
Copy link
Copy link
Closed
Labels
Description
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 cAll 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.
Reactions are currently unavailable