From 72e512329f0ed1041344a588036818687f56a0ca Mon Sep 17 00:00:00 2001 From: "zoran.bosnjak@683708e9d46ca9d9fa8957bd513e6648cbcbf421" Date: Sun, 1 Dec 2024 10:37:17 +0000 Subject: [PATCH] --- doc/forum/less_paranoid_mode.mdwn | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doc/forum/less_paranoid_mode.mdwn diff --git a/doc/forum/less_paranoid_mode.mdwn b/doc/forum/less_paranoid_mode.mdwn new file mode 100644 index 0000000000..e4fc3a93b1 --- /dev/null +++ b/doc/forum/less_paranoid_mode.mdwn @@ -0,0 +1,28 @@ +Is there a way/configuration setting to avoid directory permission problem in the following scenario: + +```bash +git init repo +cd repo/ +git-annex init +echo test > testfile +git-annex add testfile +cd .. +rm -rf repo/ +``` + +This results in the following error: + +``` +rm: cannot remove 'repo/.git/annex/objects/w8/pv/SHA256E-s5--f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2/SHA256E-s5--f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2': Permission denied +``` + +The same problem is when the repository is moved to a different filesystem (mount point). + +This fixes the problem: + +``` +find repo -type d -exec chmod 755 {} + +rm -rf repo/ +``` + +But my question is: can git-annex do this automatically? -- 2.30.2