Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3.9
-
None
Description
This actually only happens on log rotation, not on simple flush with the log file(s) still in place.
When doing a log rotate by first renaming the log file, then calling FLUSH LOGS, the open() call by flush actually needs to re-create the log file under its own name, and that rightfully fails if the mysql user does not have write permission on the directory.
The problem though is that it just reports "Unknown error" instead of "Can't create logfile $path" plus the correct error code, e.g. "errno 13: permission denied"
How to reproduce:
cd $datadir
|
mv *.err old_error_log
|
chmod a-w .
|
mysql -e "FLUSH LOGS;"
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
This actually only happens on log rotation, not on simple flush with the log file(s) still in place.
When doing a log rotate by first renaming the log file, then calling FLUSH LOGS, the open() call by flush actually needs to re-create the log file under its own name, and that rightfully fails if the mysql user does not have write permission on the directory. The problem though is that it just reports "Unknown error" instead of "Can't create logfile $path" plus the correct error code, e.g. "errno 13: permission denied" |
Key |
|
|
Workflow | Simple workflow [ 90630 ] | MariaDB v3 [ 90631 ] |
Project | Dev todo [ 10100 ] | MariaDB Server [ 10000 ] |
Affects Version/s | 10.3.9 [ 23114 ] | |
Description |
This actually only happens on log rotation, not on simple flush with the log file(s) still in place.
When doing a log rotate by first renaming the log file, then calling FLUSH LOGS, the open() call by flush actually needs to re-create the log file under its own name, and that rightfully fails if the mysql user does not have write permission on the directory. The problem though is that it just reports "Unknown error" instead of "Can't create logfile $path" plus the correct error code, e.g. "errno 13: permission denied" |
This actually only happens on log rotation, not on simple flush with the log file(s) still in place.
When doing a log rotate by first renaming the log file, then calling FLUSH LOGS, the open() call by flush actually needs to re-create the log file under its own name, and that rightfully fails if the mysql user does not have write permission on the directory. The problem though is that it just reports "Unknown error" instead of "Can't create logfile $path" plus the correct error code, e.g. "errno 13: permission denied" How to reproduce: {noformat} cd $datadir mv *.err old_error_log chmod a-w . mysql -e "FLUSH LOGS;" {noformat} |
Comment |
[ I did not pay attention when creating this, and so ended up in the wrong project
I used the "Move" function to move it over to MDEV (where it appeared as but somehow this one here still exists, too ... This one can clearly be closed / removed ... (which I can't do) ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Component/s | Server [ 13907 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Assignee | Sergei Golubchik [ serg ] |
Fix Version/s | 10.4 [ 22408 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Fix Version/s | 10.3.15 [ 23309 ] | |
Fix Version/s | 10.4.5 [ 23311 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 90631 ] | MariaDB v4 [ 155200 ] |
Zendesk Related Tickets | 119921 |