Date: Thu, 24 Jun 1999 12:30:01 -0700 (PDT) From: Nick Hibma <nick.hibma@jrc.it> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/5733: cp -r cannot copy un-writable directories Message-ID: <199906241930.MAA60333@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/5733; it has been noted by GNATS. From: Nick Hibma <nick.hibma@jrc.it> To: freebsd-gnats-submit@freebsd.org, rantapaa@uswest.net Cc: Subject: Re: bin/5733: cp -r cannot copy un-writable directories Date: Thu, 24 Jun 1999 21:24:16 +0200 cp does not recurse itself. It uses fts_read for that. This makes a solution very difficult. The only solution would be to remember the mode of every file being copied like tar does. Use tar for this and you should be allright: mkdir /tmp/foo touch /tmp/foo/bar chmod a-w /tmp/foo mkdir /tmp/hello tar -C /tmp -cf - foo | tar -C /tmp/hello -xf - ls -ld /tmp/hello/foo/ Shows tar: Added write and execute permission to directory foo drwxr-xr-x 2 n_hibma wheel 512 Jun 24 21:22 /tmp/hello/foo/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906241930.MAA60333>