Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Trouble editing a hidden file

Trouble editing a hidden file
Thread Tools
Harvey
Forum Regular
Join Date: Sep 2000
Location: Dracut, MA, USA
Status: Offline
Reply With Quote
Sep 8, 2011, 01:14 PM
 
I am playing around with Apache and php5 and need to make a slight change in a file called httpd.conf which I believe is hidden. Using Textwrangler allows me to see the file and make the necessary changes until I go to save it. It is at that moment that I am told I do not have the necessary privileges to do that. For some reason the error message #-5000 tells me I need to be in the group "wheel". Been trying to figure this out for 2 days now.
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Sep 8, 2011, 02:23 PM
 
If you're talking about the one in /private/etc and so on, the reason is that you do not have the privileges to modify it. Easiest fix is to use the "sudo" command in the terminal to open the editing application. Not sure how much you know about the Terminal, but check back if this doesn't make sense and we'll try to explain in more detail.
The new Mac Pro has up to 30 MB of cache inside the processor itself. That's more than the HD in my first Mac. Somehow I'm still running out of space.
     
Harvey  (op)
Forum Regular
Join Date: Sep 2000
Location: Dracut, MA, USA
Status: Offline
Reply With Quote
Sep 8, 2011, 02:47 PM
 
I have used the Terminal in the past and I have used sudo and know it to be dangerous if you are not careful. Could you give me a bit more details. Also, I was able to edit the above mentioned fill on my wife's MacAir. I am following a tutorial that I subscribed to from Lynda.com on setting up an Apache server. Thanks P

Harvey
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Sep 8, 2011, 03:00 PM
 
The 'wheel' group is those members allowed to elevate to root (to use sudo, basically). It sounds like you are using a regular account. Use an admin account, and in TextWrangler, click on the pencil (write) icon. It will let you authenticate, then you can save the edited file.
     
Harvey  (op)
Forum Regular
Join Date: Sep 2000
Location: Dracut, MA, USA
Status: Offline
Reply With Quote
Sep 8, 2011, 03:30 PM
 
Tried the pencil trick . . . . hadn't noticed that before . . . and made my edit. But when I did a cmd-s I got this:

This operation couldn't be completed because an error occurred.
You do not have sufficient privileges to perform this operation (MacOS error code -5000)

Click OK or Copy to Clipboard.

http://forums.macnn.com/images/smilies/bang.gif
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 8, 2011, 03:58 PM
 
Whether you are editing the file in some GUI or the Terminal, the risk is exactly the same. I suggest editing the file in your terminal with sudo with an editor of your choice (nano, vi, whatever)
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 8, 2011, 03:59 PM
 
If you really want a GUI editor you could use TextMate:

sudo mate /path/to/file
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Sep 8, 2011, 05:57 PM
 
It seems that the error you are describing might be specific to the App Store version of Textwrangler. Is that what you're using? If so, please download the version from Barebones directly and try that one.
The new Mac Pro has up to 30 MB of cache inside the processor itself. That's more than the HD in my first Mac. Somehow I'm still running out of space.
     
Love Calm Quiet
Mac Elite
Join Date: Mar 2001
Location: CO
Status: Offline
Reply With Quote
Sep 10, 2011, 08:24 AM
 
How about using "Get Info" (Cmd-i) in Finder, going to the Permissions near bottom of info window (noting - so you can reset as before) and setting to "Read/Write" for "Everybody".
Then see how Text Wrangler handles it.
TOMBSTONE: "He's trashed his last preferences"
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:52 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,