If you have problems with file permissions, the
UMASK or UMASK_DIR
environment variable might be set incorrectly when
mysqld starts. For example, MySQL might
issue the following error message when you create a table:
ERROR: Can't find file: 'path/with/filename.frm' (Errcode: 13)
The default UMASK and
UMASK_DIR values are
0660 and 0700,
respectively. MySQL assumes that the value for
UMASK or UMASK_DIR is in
octal if it starts with a zero. For example, setting
UMASK=0600 is equivalent to
UMASK=384 because 0600 octal is 384
decimal.
To change the default UMASK value, start
mysqld_safe as follows:
shell>UMASK=384 # = 600 in octalshell>export UMASKshell>mysqld_safe &
By default, MySQL creates database directories with an access
permission value of 0700. To modify this
behavior, set the UMASK_DIR variable. If
you set its value, new directories are created with the
combined UMASK and
UMASK_DIR values. For example, to give
group access to all new directories, start
mysqld_safe as follows:
shell>UMASK_DIR=504 # = 770 in octalshell>export UMASK_DIRshell>mysqld_safe &
For additional details, see Section 4.9, “MySQL Program Environment Variables”.