Changing default permissions -without "umask"-...

Hi!

My question is this:

Is it possible to change the default permissions in UNIX (666 for files and 777 for directories)?.

I am not talking about using the command "umask".

I mean, with the command "umask" you can modify permissions from a default permissions x. Is it possible to make "umask" modifies permissions not from x but from y?

I supouse that the numbers 666 and 777 are defined in some file anywhere in the file system. Where are they defined? How can I change it?

Thanks for your time.

When someone writes a program that creates files, they decide on what file permission to use. umask can be used to inhibit some some bits that the programmer tried to set. But it can't turn on new bits that the programmer did not want. Many programmers use that 666, 777 standard. But if you don't like the choice that a programmer made, write your own version of the program that operates the way you want. No other way to do it.

Ok, I understand this. I understand what is "umask" used for.

But i am not convinced about that.

I am sure these numbers (666 and 777) have to be defined anywhere. Where?

Maybe I am wrong, it is possible. But if not, i want to know the answer.

Again, thanks for your time.

umask does not modify permissions on any existing file. It only affects the permissions on newly created files. In your shell prompt, type umask, which shows the current setting. There's more about umask here

user@machine[/home/user]>umask
022

Check either the user's $HOME/.profile or /etc/profile as that is where the umask is generally set --- in my experience anyways.