[[!comment format=mdwn
 username="https://me.yahoo.com/a/EbvxpTI_xP9Aod7Mg4cwGhgjrCrdM5s-#7c0f4"
 subject="comment 4"
 date="2015-09-02T19:14:18Z"
 content="""
I am confused then.  You said

> it does detect a crippled FS when run as root here.

which I took as the indication that on any FS if ran as root annex would detect it as \"crippled\" since then user (root) has ability to change even read only files/directories (thus removal was to demonstrate ability to overcome permissions protection). Was I wrong?

Here is redone script which instead of removing augments the file... and again annex doesn't consider file system crippled while I can augment file inplace

[[!format bash \"\"\"
$> cat /tmp/test-crippled.sh                                                         
#!/bin/bash

rm -rf /tmp/123; 
mkdir /tmp/123; 
cd /tmp/123; 
git init; git annex init; 
echo 123 > 1.dat; 
git annex add 1.dat; 
git commit -m 'initial'; 
ls -l /tmp/123 ; 

ff=$(readlink /tmp/123/1.dat)
echo cripple >> /tmp/123/1.dat && echo CRIPPLED

echo \"new content: \"
cat /tmp/123/1.dat
ls -l /tmp/123/1.dat
rm -rf /tmp/123


# sudo run
$> sudo /tmp/test-crippled.sh                                                         
Initialized empty Git repository in /tmp/123/.git/
init  ok
(recording state in git...)
add 1.dat ok
(recording state in git...)
[master (root-commit) 01ffc3b] initial
 1 file changed, 1 insertion(+)
 create mode 120000 1.dat
total 4
lrwxrwxrwx 1 root root 186 Sep  2 15:10 1.dat -> .git/annex/objects/zk/71/SHA256E-s4--181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b.dat/SHA256E-s4--181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b.dat
CRIPPLED
new content: 
123
cripple
lrwxrwxrwx 1 root root 186 Sep  2 15:10 /tmp/123/1.dat -> .git/annex/objects/zk/71/SHA256E-s4--181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b.dat/SHA256E-s4--181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b.dat

# normal run
$> /tmp/test-crippled.sh    
Initialized empty Git repository in /tmp/123/.git/
init  ok
(recording state in git...)
add 1.dat ok
(recording state in git...)
[master (root-commit) 74a1759] initial
 1 file changed, 1 insertion(+)
 create mode 120000 1.dat
total 4
lrwxrwxrwx 1 yoh yoh 186 Sep  2 15:10 1.dat -> .git/annex/objects/zk/71/SHA256E-s4--181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b.dat/SHA256E-s4--181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b.dat
/tmp/test-crippled.sh: line 13: /tmp/123/1.dat: Permission denied
new content: 
123
lrwxrwxrwx 1 yoh yoh 186 Sep  2 15:10 /tmp/123/1.dat -> .git/annex/objects/zk/71/SHA256E-s4--181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b.dat/SHA256E-s4--181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b.dat
rm: cannot remove ‘/tmp/123/.git/annex/objects/zk/71/SHA256E-s4--181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b.dat/SHA256E-s4--181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b.dat’: Permission denied
\"\"\"]]
"""]]
