How do I set initial or default permissions, i.e., group write permission

Asked by Doug

When I download or create files (e.g., .jpg or .doc files) the file permissions initially usually are as follows:

rw-r--r-

meaning my user's default group does *not* have write permission, and a guest *would* have read permission.

I know how to change these things after they are created. But how do I change the *defaults* or *initial* permissions so that the next time I create a picture or document it will automatically have different permissions, such as:

rw-rw---

In other words, where is the setting to change default group or guest file permissions?

The reason why I want to do this is because I am using a Samba share and another user is part of my permissions group, and I would like that user to have full access to those files from the time they are created, and I don't want to have to remember to go back every time I download/create the files, to change the permissions. Ideas?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu samba Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ubfan (ubfan1) said :
#1

see the man pages for umask
man umask
Your umask is probably (0)022 set in /etc/profile
To override, edit the change into your home directory's .profile (thats <dot>profile). the umask line in .profile is commented out, so uncomment it by deleting the #, then change the 022 to 002 or whatever.

Can you help with this problem?

Provide an answer of your own, or ask Doug for more information if necessary.

To post a message you must log in.