This is defined by umask. It sets the default for creating and change of permissions of files.
To see the umask by default in a easy way issue the command umask -S
. For example the result:
u=rwx,g=rx,o=rx
means that for user applies all, for group only read and execute, and the same for others.
To change it issue umask on this way:
umask x@y
where:
x could be: u
(user), g
(group),o
(other) or a
(all)
@ could be +
to add permissions, -
to remove permissions
y could be r
(read), w
(write), x
(execute)
For example: umask g+w
enable write permissions by default to group
when you do a chmod +w
.
More information here or issuing man umask
on the command prompt.