how to have files created by a user with permission write and read for user and group ?

following this thread may be is better to open another thread with another title
in opensuse 13.2 and kde when a user create a file the permission of this file are write and read for user and read for group and others.
is it possible to set the user to create files with permission write and read for user and group and read for others??
manythanks, ciao :slight_smile: pier

When this is just for a few cases, trhe uer better does this after creating them (either from a desktop file manager or with

chmod g+w file1 file 2 .....

When the user wants this done normaly, he can set his umask. The umask at the moment is most probably

henk@boven:~> umask

Which means to not set the write bits for group and others on file creation.
(027 is also a good setting).

umask 0002

will restrict that action to the “others” bit only.
( or set it to 0007 as wanted, in any case change that one 2 into a 0).

As said, when a user wants this as a default, it is best to add this statement in his .profile (and re-login after doing this).

…manythanks, :slight_smile: it works fine.
very interesting file this .profile… :slight_smile:

Yes, but be carefull. Know what you are doing when changing/adding things there.

…yes, thanks for the advice, I know that privacy of each user vanishes, but these are two laptops used by four users randomly, so the behaviour of linux about permission on files in this case is very annoying, and the privacy could be leaved apart…:slight_smile: and also the different linux user settings are very useful especially with fastuserswitch widget…