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 > Mac OS X > How can you show the octal file permissions?

How can you show the octal file permissions?
Thread Tools
Forum Regular
Join Date: Jul 2004
Location: Heaven
Status: Offline
Reply With Quote
Jan 5, 2005, 03:55 PM
 
I'm trying to create a script that will process a file's octal permissions and if they're more permissive than need be, change the permissions to something more restrictive.

Is there a way to display the file's octal permission representation, as opposed to the rwxr--r-- thing?

Maybe a way to use ls to show that... I'm almost shooting in the dark here, but any suggestions will be greatly appreciated.

Thanks
::: r00t ::: - 15" PBook / 1.25 GB/ 1.33Ghz
     
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status: Offline
Reply With Quote
Jan 6, 2005, 02:27 AM
 
a quick google came up with this. would that be of any use to you? i'm using a W2K machine right now (ergh), so i can't even check it out properly myself.
     
Forum Regular
Join Date: Jul 2004
Location: Heaven
Status: Offline
Reply With Quote
Jan 6, 2005, 09:43 AM
 
Thanks for that link. Seems as if I'll be able to do what i'm trying to do using a simple chmod..

Thanks Again,

skelotar
::: r00t ::: - 15" PBook / 1.25 GB/ 1.33Ghz
     
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status: Offline
Reply With Quote
Jan 6, 2005, 09:51 AM
 
Originally posted by skelotar:
I'm trying to create a script that will process a file's octal permissions...
Since you're scripting anyway, why not just deal with the permissions as they come?

Chris
     
   
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 06:57 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