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 > Applications > Arrrgh, Read Only file, How to Change in TERMINAL?

Arrrgh, Read Only file, How to Change in TERMINAL?
Thread Tools
Professional Poster
Join Date: Mar 2005
Status: Offline
Reply With Quote
Jun 19, 2007, 03:43 PM
 
Hi:

I have a stubborn file that is read only. Get Info will not allow me to convert it into a read and write file, I even logged in as root. I have even clicked on "Ignore permissions" under Get Info. How do I change the file permission (.txt file) in Terminal? I understand it is possible to change permissions on these read only files in Terminal. Thanks.
"Life is the crummiest book I ever read. There isn't a hook, just a lot of cheap shots, pictures to shock, and characters an amateur would never dream up." (Bad Religion)
     
Dedicated MacNNer
Join Date: Nov 2001
Status: Offline
Reply With Quote
Jun 19, 2007, 03:53 PM
 
You're gonna need to use the "chmod" command to fix POSTIX permissions in Terminal.app.

Besure to insert the "sudo" command before "chmod" (i.e. # sudo chmod), so that you can perform the action as if you were logged in as root.

A great resource detailing "chmod": Understanding UNIX permissions and chmod

If this doesn't work and it's not a forked or packaged file.... then another solution is to move the file to a FAT formatted disk and then back again, because FAT doesn't observe or retain POSTIX permissions.

Good luck!
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 19, 2007, 04:24 PM
 
dowNNshift: it's "posix", not "postix".

sudo chmod +w <path to file> will do it. You can drag the file into your Terminal to have the path name automatically generated for you.

You'll need to do this as an admin user.
     
Mac Elite
Join Date: Nov 2001
Status: Offline
Reply With Quote
Jun 19, 2007, 10:25 PM
 
Is it actually set to read-only or is it locked (with the lock icon)?

chmod is the one if it's read-only (permissions will be r--r--r--, or equivalent).

If it's locked (you should see a tiny lock icon in Finder), it's possible the uchg flag has been set. It's an arcane command... basically you have to do:

sudo chflags -nouchg <filename>

Which should unset it.
     
   
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:27 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2