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 > Default folder permissions

Default folder permissions
Thread Tools
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Dec 20, 2002, 10:14 AM
 
I realized this at some long ago time, but it just resurfaced in my thoughts. New folders and documents created in the Home folder have default permissions that give everyone read access. Is there a way to change what the default permissions are for a newly created folder/document so that I don't have to remember to manually change them everytime I create a new one?

thanks,
kman
     
Addicted to MacNN
Join Date: Apr 2001
Location: europe
Status: Offline
Reply With Quote
Dec 20, 2002, 10:21 AM
 
They are created from /System/Library/User Template/
Nasrudin sat on a river bank when someone shouted to him from the opposite side: "Hey! how do I get across?" "You are across!" Nasrudin shouted back.
     
kman42  (op)
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Dec 20, 2002, 11:15 AM
 
Do I just set the permissions on that folder to the default permissions I want or is there a config file somewhere in that folder?

Can you copy that folder to th ~/Library directory so that different users can set different default permissions?

kman
     
kman42  (op)
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Dec 23, 2002, 10:18 AM
 
Bounce.

Sorry to be a dolt, but I still don't understand how this works. That folder is owned by System and I can't set the group permissions to not Read or Write unless I change the owner. Is it okay to set that folder to owned by me? Or when another user creates a folder will it be owned by me?

thanks,
kman
     
Mac Elite
Join Date: Sep 2000
Location: Canada
Status: Offline
Reply With Quote
Dec 23, 2002, 10:53 AM
 
Developer didn't read your post properly. The folders in "/System/Library/User Template" are used when a new user is created and have nothing to do with folders made in the home directory after a user is created.

As to your question, I don't of anything that will do what you ask.
     
kman42  (op)
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Dec 23, 2002, 11:04 AM
 
That's a bummer, man.

Doesn't the default behavior seem a little odd. Most users won't even think to check the permissions on folders they create (unless they are power users or just know better). Shouldn't the default behavior be to make new folders readable only to the owner?

kman
     
JLL
Professional Poster
Join Date: Apr 1999
Location: Copenhagen, Denmark
Status: Offline
Reply With Quote
Dec 23, 2002, 11:10 AM
 
Originally posted by kman42:
That's a bummer, man.

Doesn't the default behavior seem a little odd. Most users won't even think to check the permissions on folders they create (unless they are power users or just know better). Shouldn't the default behavior be to make new folders readable only to the owner?

kman
Other users can't get into your folders.

To change the default you would have to change the umask - I can't remember where, but I think it's in the startup script.
JLL

- My opinions may have changed, but not the fact that I am right.
     
kman42  (op)
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Dec 23, 2002, 11:56 AM
 
Originally posted by JLL:


Other users can't get into your folders.

To change the default you would have to change the umask - I can't remember where, but I think it's in the startup script.
Actually, they can. Create a folder in your Home directory and log in as another user.

kman
     
kman42  (op)
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Dec 29, 2002, 04:14 PM
 
I'm surprised no one has comments or helpful insights on this.

kman
     
kman42  (op)
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Jan 5, 2003, 11:24 AM
 
Sorry. This is the last time I'll bounce this thread. I just can't believe that no one else has anything to say about this.

kman
     
kman42  (op)
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Jan 5, 2003, 11:55 AM
 
I finally found a great explanation of this issue over at osxfaq.com.

New files have permissions set to 644 and new directories are set to 755 by default. Normally, this isn't a problem if you create files or directories within one of the default folders in your home folder (Documents, Movies, etc) since they are set to only be readable by the owner. However, if you create a directory or a file in your Home directory, then that file/directory will be readable by everyone.

umask is used to REDUCE the permissions by the amount specified in umask from 666 for files or 777 for directories. For instance, the default setting of 'umask 022' reduces new files to 644 and directories to 755. If you set umask to 066 then new files will be 600 (read/write by owner, no access by anyone else) and directories to 711 (full access by owner, executable by everone else).

For a more complete understanding, see www.osxfaq.com. Look for the advanced UNIX tutorial and permissions. Their tutorials are excellent.

kman
     
   
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 12:01 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