Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

There is a file in my /opt/local/include folder on OSX that I wish to edit.

This is currently set to 'Read only'. So, to allow me to edit, I have selected get info, then under sharing and permissions I have added myself, and given me the privileges Read and write. However, I now open the file and am still unable to save it.

What do I need to do to allow me to edit and save this file?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You're using an editor that, when saving, replaces the file instead of changing its contents.

Give yourself permissions for the parent folder and you'll be able to save, or use another editor.

share|improve this answer
    
Yes, changing the folder permissions did the trick. How bizarre. –  Bill Cheatham Feb 7 '11 at 22:09
    
@Bill It's actually a reasonable way to handle saving files, permissions aside. If saving fails halfway through writing the file, you'll have neither the old nor the new data anymore otherwise. –  Daniel Beck Feb 7 '11 at 22:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.