bash - delete .git directory. locked and permission denied -
i have tmp .git files can't remove no matter try.
i've tried chmod , rm terminal:
chmod a+wx zzz_delete/ seth-laptop:lepton_master seth_mac$ sudo rm -rf zzz_delete/ rm: zzz_delete//.git/objects/tmp_object_git2_a03228: permission denied
i ran bash script force chmod:
chmod: unable change file mode on /zzz_delete/.git/objects/tmp_object_git2_a03228: operation not permitted
i tried delete windows machine. permission denied.
how can change permissions , remove tricky folder?
it exists special attribute not allow root delete file.
try see if immutable bit set on file with:
lsattr /zzz_delete/.git/objects/tmp_object_git2_a03228
if answers like
----i-------- tmp_object_git2_a03228
gotcha! have unset before removing:
sudo chattr -i nomefile
what immutable bit : immutable bit can used prevent accidentally deleting or overwriting file must protected. prevents creating hard link file. see chattr(1) man page information on immutable bit.
Comments
Post a Comment