I want a fully usable folder which can't be deleted

Discussion in 'macOS' started by bongabonga, Oct 14, 2007.

  1. bongabonga macrumors newbie

    Joined:
    Oct 3, 2007
    Location:
    New York
    #1
    Is there any way in OSX to protect a folder from being deleted, while keeping it fully functional as a 'normal' folder?

    Normal folder = one which I can copy to and from, delete individual files, rename, move wherever, etc...

    (Sorry if the answer is obvious, I've spent a while searching and still haven't found a way to do this...)
     
  2. rdowns macrumors Penryn

    rdowns

    Joined:
    Jul 11, 2003
    #2
    Why not just lock the folder so it can't be deleted accidentally? You lock a folder by clicking Get Info and checking the Lock Folder box.
     
  3. bongabonga thread starter macrumors newbie

    Joined:
    Oct 3, 2007
    Location:
    New York
    #3
    If I lock the folder I can't write to it...

    I want/need the folder to be fully usable (see above) :)
     
  4. SC68Cal macrumors 68000

    Joined:
    Feb 23, 2006
  5. bongabonga thread starter macrumors newbie

    Joined:
    Oct 3, 2007
    Location:
    New York
    #5
    Thanks for that. The sticky might be what I need, I'm gonna read more about it.

    Please correct me if I read the sticky info wrong, but because I have admin rights (this is my personal computer) I am the creator of the files, and would thus still be able to delete whatever files inside the folder and the folder itself, correct?

    (edit: which is not what I want; I want the folder to be indestructible (at least without me authorizing something, which means no accidental plopping in the trash. The only reason why I'm doing this (and not every single folder on my computer) is that I use this folder a lot for all sorts of temp files...)
     
  6. SC68Cal macrumors 68000

    Joined:
    Feb 23, 2006
  7. bongabonga thread starter macrumors newbie

    Joined:
    Oct 3, 2007
    Location:
    New York
    #7
    Firstly, I'm a total noob when it comes to using the Terminal. :) Whenever someone tells me to use this or that command, I always end up googling it to see if I find more info. I'm afraid that (A) I'll break something, and (B) I won't be able to fix it. Actually, I know B is a fact.

    Secondly, an immutable folder behaves just like a locked folder (probably is exactly the same thing, I have no idea). Regardless, I can't seem to get it to work the way I want. A locked folder means I can't write to it without authenticating every single action, which is definitely not what I'm after: I want it to function just like any folder I'd create on my desktop, with the exception that the folder:
    - can not be deleted
    - can not even be dragged to the trash

    That would prevent the trash from emptying all files inside the folder while leaving the folder itself.

    Of course I can always use an alias, but I'm still curious if this is possible. Thanks for your help.
     
  8. SC68Cal macrumors 68000

    Joined:
    Feb 23, 2006
    #8
    RTFMP

    There are lots of options......

    Can anyone else confirm that chflags uunlnk works? I cannot get this to work because when I use the short name it says that it is an invalid flag, and when I use the octal notation the operation silently fails.

    Code:
    $ chflags uunlnk test
    chflags: invalid flag: uunlnk
    $ chflags 20 test
    $ rm test
     
  9. SC68Cal macrumors 68000

    Joined:
    Feb 23, 2006
    #9
    Okay I did some more digging. What is dissapointing is that Mac OS X has not implemented the feature you are looking for. It's really sad, because it would have been very useful.

    Just goes to show you how committed Mac OS X is to their open source :rolleyes:

     
  10. bongabonga thread starter macrumors newbie

    Joined:
    Oct 3, 2007
    Location:
    New York
    #10
    True.

    Just so you know, I did go through allt he chflag-info before I posted the noob-comment, heh.

    Thanks again for all your help. This would indeed be a very handy feature, even as a (optional) default setting for important folders.
     
  11. SC68Cal macrumors 68000

    Joined:
    Feb 23, 2006
    #11
    I'm going to try and do some more digging, find out what happened to that flag. I would like to know what happened to it, I think that there is some usefulness to it. I looked at my system (10.4.10) and there was no mention of it in my header file. It must have been moved somewhere.
     

Share This Page