Luckily, if you do run into problems with a file that cannot be edited, either in the Terminal or in the Finder, you can unlock it by performing the following steps using the Terminal:
sudo chflags nouchg
When run, this command will undo the lock flag for the file, regardless of whether you own the file. While an enabled lock will prevent the file from being edited, ultimately it is designed to be a temporary hurdle that can be undone by any user who has access to the file.
There’s a great utility for windows that allows you to right-click on a directory and open a command prompt (dos window) directly in that folder. Wouldn’t it be great if mac had the same thing. In Lion, they do!!
Go to Preferences and open the Keyboard preferences. Choose the Keyboard Shortcuts tab and on the left choose Services. On the right, scroll down a bit to the Files and Folders section and look for New Terminal at Folder. Turn this option on. Optionally you may choose to turn on New Terminal Tab at Folder. You can also double click in the white space to the right of either option and choose a keyboard shortcut which will also perform the service. Once your options are set and items are checked, go to a Finder window and right click on a folder. Near the bottom you should see a Services menu item and from there should see either New Terminal at Folder or New Terminal Tab at Folder.