Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / General / General / May 2008



Tip: Looking for answers? Try searching our database.

Umask for office documents

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
andrea - 30 May 2008 11:23 GMT
I would like that whenever I save a file with whatever program in a
certain folder it saves it with permission

rw-rw-r

Using umask it works but only with shell created files, how can I set
it globally??
Thanks a lot
PawStephan - 30 May 2008 13:46 GMT
In article
<a7345e87-c9b0-434d-a9e0-fa183912e9da@a1g2000hsb.googlegroups.com>,

> I would like that whenever I save a file with whatever program in a
> certain folder it saves it with permission
[quoted text clipped - 4 lines]
> it globally??
> Thanks a lot

You mean rw-rw-r-- ?

Information I looked up shows that you need a Umask of 002. That you
have to translate to decimal_number (don't know that one) and issue the
following command in a terminal window:

sudo defaults write /Library/Preferences/.GlobalPreferences NSUmask
decimal_number

(space between NSUmask and decimal_number)
See also:

http://forums.devshed.com/unix-help-35/umask-problem-159772.html

You're well on your way with a Mac and Leopard. Why not switch to
MT-Newswatcher in stead of GGroups?
Good luck.

Signature

ROT-13 to send an e-mail: 1abercyl@urgarg.ay

andrea - 30 May 2008 14:27 GMT
> In article
> <a7345e87-c9b0-434d-a9e0-fa183912e...@a1g2000hsb.googlegroups.com>,
[quoted text clipped - 16 lines]
> sudo defaults write /Library/Preferences/.GlobalPreferences NSUmask
> decimal_number

Yes I found this hint but this is a global change, which can lead to
some problems if I'm not wrong...
I may try that for the user which saves the fiiles

> (space between NSUmask and decimal_number)
> See also:
[quoted text clipped - 7 lines]
> --
> ROT-13 to send an e-mail: 1aber...@urgarg.ay

Normally I use thunderbird but when I'm behind another server I can't
use it
andrea - 30 May 2008 14:38 GMT
> In article
> <a7345e87-c9b0-434d-a9e0-fa183912e...@a1g2000hsb.googlegroups.com>,
[quoted text clipped - 28 lines]
> --
> ROT-13 to send an e-mail: 1aber...@urgarg.ay

I tried this
defaults write .GlobalPreferences.plist NSUmask 2

with no luck, the file doesn't change at all as diff say...
PawStephan - 30 May 2008 18:35 GMT
In article
<cba3251a-dff6-4647-aa4c-439d75c27ae5@x35g2000hsb.googlegroups.com>,

> > In article
> > <a7345e87-c9b0-434d-a9e0-fa183912e...@a1g2000hsb.googlegroups.com>,
[quoted text clipped - 33 lines]
>
> with no luck, the file doesn't change at all as diff say...

Hello, I thought you were experienced with the subject. What you tried
won't work. For instance:

The default umask on Mac OS X systems is 022; this means that by default
all users are granted read
access to all newly created files.  It is recommended that this be
changed to 027 so that only users in
the same group are permitted automatic read access to new files.  
Organisational security standards
may dictate an alternative umask.  Since the umask setting must be
specified as a    *** decimal value ***   , the
octal value 027 would be 23 in decimal notation.  To change the default
umask, execute the following
command:
sudo defaults write /Library/Preferences/.GlobalPreferences NSUmask 23

So....attenzione (attention please) Andrea...find out what the decimal
notation of NSUmask 002 is. (don't know that one). That would solve your
'problem'.
Good luck.

Signature

ROT-13 to send an e-mail: 1abercyl@urgarg.ay

Jolly Roger - 30 May 2008 18:46 GMT
> Since the umask setting must be
> specified as a    *** decimal value ***   , the
[quoted text clipped - 6 lines]
> notation of NSUmask 002 is. (don't know that one). That would solve your
> 'problem'.

For those who wish to convert hexadecimal, decimal, octal, and binary
numbers the lazy way in Mac OS X 10.5:

1. Open /Applications/Calculator.
2. From the Calculator menu bar, choose View > Programmer (or just click
the (+) button on the window title bar twice).
3. Just under the display area, click the "Dec" button.
4. Enter a decimal number.
5. Click "Oct" or "Hex" to view the corresponding equivalent.

Signature

Please send all responses to the relevant news group. E-mail sent to
this address may be devoured by my very hungry SPAM filter. I do not
read posts from Google Groups. Use a real news reader if you want me to
see your posts.

JR

andrea - 30 May 2008 23:12 GMT
> In article
> <cba3251a-dff6-4647-aa4c-439d75c27...@x35g2000hsb.googlegroups.com>,
[quoted text clipped - 60 lines]
> --
> ROT-13 to send an e-mail: 1aber...@urgarg.ay

Yes I think I understood already, but the problem is that I only want
ONE folder to behave with umask 002, for every program working on it.

That default setting is not doing this if I'm not wrong...
billy@MIX.COM - 31 May 2008 00:22 GMT
> > So....attenzione (attention please) Andrea...find out what the decimal
> > notation of NSUmask 002 is. (don't know that one). That would solve your
> > 'problem'.

In this case (less than eight) it is the same.

> Yes I think I understood already, but the problem is that I only want
> ONE folder to behave with umask 002, for every program working on it.

You want an access control list -

http://www.macosxhints.com/article.php?story=2005050120073947

More detailed info is here -

http://www.bresink.com/osx/193281/Docs-en/ACL.html

Billy Y..
Tom Stiller - 30 May 2008 16:53 GMT
In article
<a7345e87-c9b0-434d-a9e0-fa183912e9da@a1g2000hsb.googlegroups.com>,

> I would like that whenever I save a file with whatever program in a
> certain folder it saves it with permission
[quoted text clipped - 4 lines]
> it globally??
> Thanks a lot

Have a look at <http://www.astro.washington.edu/owen/AquaEnvVar.html>

Signature

Tom Stiller

PGP fingerprint =  5108 DDB2 9761 EDE5 E7E3  7BDA 71ED 6496 99C0 C7CF

Király - 31 May 2008 04:37 GMT
> I would like that whenever I save a file with whatever program in a
> certain folder it saves it with permission
[quoted text clipped - 3 lines]
> Using umask it works but only with shell created files, how can I set
> it globally??

Setting the umask is not a reliable way to do what you want if you are
working outside the shell.  Even if you do set it globally, some
applications will ignore it and set the default -rw-r--r-- permissions
anyway.  Finder is one such app.

A reliable way to do it is with ACLs.  You must be running 10.4 or
higher.  

Start with a new empty folder.  Call it something like
/Users/Shared/foo

Then log in to an admin account, launch Terminal, paste these three
lines all at once, replacing "UserName" with short name of a user or
group to be given access:

sudo chmod +a "UserName allow delete,chown,list,search,add_file,\
add_subdirectory,delete_child,file_inherit,directory_inherit" \
/Users/Shared/foo

Repeat the above if you want to add more users.

When done, you are finished.  Any file that is newly created anywhere in
that folder or its subfolders will be writable by all the users you
specified.  

Note that if you want to move existing files there and have them inherit
the group write privilege, you'll have to COPY them there (hold down the
command key when drag-n-dropping).  

--
K.

Lang may your lum reek.
andrea - 31 May 2008 09:25 GMT
> > I would like that whenever I save a file with whatever program in a
> > certain folder it saves it with permission
[quoted text clipped - 37 lines]
>
> Lang may your lum reek.

Thanks a lot, it works on my leopard mbp, but on that tiger Imac it
gives:
chmod: Failed to set ACL on file PAPI: Operation not supported
billy@MIX.COM - 31 May 2008 16:43 GMT
> Thanks a lot, it works on my leopard mbp, but on that tiger Imac it
> gives:
> chmod: Failed to set ACL on file PAPI: Operation not supported

Take a look at this -

http://arstechnica.com/reviews/os/macosx-10-4.ars/8

Especially this part -

| For ACLs to work at all, they must be enabled for a particular volume.
| The Workgroup Manager application in Mac OS X 10.4 Server can do this,
[quoted text clipped - 3 lines]
|
| % sudo /usr/sbin/fsaclctl -p / -e

The percent sign represents the command line prompt, and is not part
of what you'd type in on the command line.

Billy Y..
Jolly Roger - 31 May 2008 17:02 GMT
In article
<6cefbaab-b532-4a87-b4c7-579c6059ed50@c65g2000hsa.googlegroups.com>,

> Thanks a lot, it works on my leopard mbp, but on that tiger Imac it
> gives:
> chmod: Failed to set ACL on file PAPI: Operation not supported

Time to upgrade to Leopard then - or do without.

Signature

Please send all responses to the relevant news group. E-mail sent to
this address may be devoured by my very hungry SPAM filter. I do not
read posts from Google Groups. Use a real news reader if you want me to
see your posts.

JR

Király - 31 May 2008 17:16 GMT
> Time to upgrade to Leopard then - or do without.

No need to do that.  I just forgot to tell him about the additional step
that's required in 10.4; enabling ACLs with fsaclctl.  With Leopard ACLs
are already enabled.

Signature

K.

Lang may your lum reek.

Király - 31 May 2008 17:13 GMT
> Thanks a lot, it works on my leopard mbp, but on that tiger Imac it
> gives:
> chmod: Failed to set ACL on file PAPI: Operation not supported

Sorry, there's an additional step for Tiger users that I forgot to tell
you about.  Before entering the sudo chmod +a command,  enable ACLs on
your boot volume by logging in to an admin account and entering this in
Terminal:

sudo fsaclctl -p / -e

Then proceed with the rest.

Signature

K.

Lang may your lum reek.

Jolly Roger - 31 May 2008 17:22 GMT
> > Thanks a lot, it works on my leopard mbp, but on that tiger Imac it
> > gives:
[quoted text clipped - 3 lines]
> you about.  Before entering the sudo chmod +a command,  enable ACLs on
> your boot volume

Oh right!  Forgot about that.  Disregard my earlier message.  : )

Signature

Please send all responses to the relevant news group. E-mail sent to
this address may be devoured by my very hungry SPAM filter. I do not
read posts from Google Groups. Use a real news reader if you want me to
see your posts.

JR

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.