Details
Description
select into outfile creates files everytime with 666 permission, regardsless if umask environment variables and umask settings on OS level.
It seems hardcoded.
/***************************************************************************
|
** Export of select to textfile
|
***************************************************************************/
|
[..]
|
static File create_file(THD *thd, char *path, sql_exchange *exchange, |
IO_CACHE *cache)
|
[...]
|
/* Create the file world readable */ |
if ((file= mysql_file_create(key_select_to_file, |
path, 0666, O_WRONLY|O_EXCL, MYF(MY_WME))) < 0) |
return file; |
#ifdef HAVE_FCHMOD
|
(void) fchmod(file, 0666); // Because of umask() |
#else |
(void) chmod(path, 0666); |
#endif
|
It should use my_umask instead to respect UMASK and UMASK_DIR environment variables.
Attachments
Issue Links
- relates to
-
MDEV-15844 Add umask and umask_dir as server variable
-
- Needs Feedback
-
-
MDEV-23058 UMASK and UMASK_DIR are modes, not umasks
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Link | This issue relates to MDEV-15844 [ MDEV-15844 ] |
Component/s | Server [ 13907 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Assignee | Sergei Golubchik [ serg ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Summary | select into outfile not respekt UMASK and UMASK_DIR | select into outfile not respect UMASK and UMASK_DIR |
Assignee | Sergei Golubchik [ serg ] | Rucha Deodhar [ rucha174 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Assignee | Rucha Deodhar [ rucha174 ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Rucha Deodhar [ rucha174 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.2.37 [ 25112 ] | |
Fix Version/s | 10.3.28 [ 25111 ] | |
Fix Version/s | 10.4.18 [ 25110 ] | |
Fix Version/s | 10.5.9 [ 25109 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 114163 ] | MariaDB v4 [ 158428 ] |
Zendesk Related Tickets | 114123 |