Rechercher dans le manuel MySQL
B.4.3.1 Problems with File Permissions
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/file_name' (Errcode: 13)
The default UMASK
and
UMASK_DIR
values are
0640
and 0750
,
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 octal
shell> export UMASK
shell> mysqld_safe &
By default, MySQL creates database directories with an access
permission value of 0750
. 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 octal
shell> export UMASK_DIR
shell> mysqld_safe &
For additional details, see Section 4.9, “MySQL Environment Variables”.
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-file-permissions.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.