how to delete file owned by root?

Posted:
in Genius Bar edited January 2014
drag a file to HD folder by accident and said cant be deleted as owned by root



what can i do??



thanks

Comments

  • Reply 1 of 9
    ast3r3xast3r3x Posts: 5,012member
    change who it is owned by (if ur an admin)



    -OR-



    log in as root
  • Reply 2 of 9
    firehcfirehc Posts: 368member
    i am an admin, but how....

    more details please,

    thanks
  • Reply 3 of 9
    ast3r3xast3r3x Posts: 5,012member
    click on file command+i



    there is a panel or something for privledges and permissions



    change who it is owned by...u may have to click the lock if its locked



    then it willprobably ask u for u admin password, type it in and ur set
  • Reply 4 of 9
    murbotmurbot Posts: 5,262member
    Off to the Genius Bar with ya.
  • Reply 5 of 9
    firehcfirehc Posts: 368member
    thanks ast3r3x
  • Reply 6 of 9
    paulpaul Posts: 5,278member
    [quote]Originally posted by ast3r3x:

    <strong>click on file command+i



    there is a panel or something for privledges and permissions



    change who it is owned by...u may have to click the lock if its locked



    then it willprobably ask u for u admin password, type it in and ur set</strong><hr></blockquote>



    what if that doesn't work?



    A friend of mine has a stubborn preference pane that refuses to be deleted... even if i change permissions...



    how do i delete something via the terminal?
  • Reply 7 of 9
    123123 Posts: 278member
    [quote]Originally posted by Paul:

    <strong>



    what if that doesn't work?



    A friend of mine has a stubborn preference pane that refuses to be deleted... even if i change permissions...



    how do i delete something via the terminal?</strong><hr></blockquote>





    rm filename

    rm -rf dirname



    if you don't have enough permissions to delete the file, let root do it:

    sudo rm filename

    sudo rm -r dirname



    (you have to enter your administrator password. "enabling the root account" is not required. be warned, this is dangerous if you don't know what you're doing)



    You should learn how to use the terminal, at least some basic actions like navigating, moving files, starting programs etc.
  • Reply 8 of 9
    lungarettalungaretta Posts: 194member
    123 kinda covered it above but i *wouldn't* try this for fun:



    sudo rm -rf /





    (should get rid of the file though <img src="graemlins/lol.gif" border="0" alt="[Laughing]" /> )
  • Reply 9 of 9
    os10geekos10geek Posts: 413member
    How to delete a item owned by root though Terminal For Dummies: ("Dummies" Read "Mac people that have never gone beyond Aqua)





    Step 1. Login as Root if possible. However, these steps will work in any login account that has access to Terminal.



    Step 2. Open Terminal, and type sudo rm -r and then hit space. Do not press return.



    Step 3. Drag the file's icon into the terminal window(if possible) or enter its path. Press return.



    Step 4. You will be prompted to type in your password. Warning: When you are typing in your password, you won't see any "****" characters as you do normally while entering a password.



    Step 5. Press return. The file should be deleted without complaint.



    I have deleted many files in this manner, including the Setup Assistant, that the computer says "can not be deleted." Yeah right.



    [ 03-08-2003: Message edited by: os10geek ]</p>
Sign In or Register to comment.