mysqld_safe should diagnose non-root user for setting vm.drop_caches

Bug #1432509 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Invalid
Undecided
Unassigned
5.5
Triaged
Medium
Unassigned
5.6
Triaged
Medium
Unassigned
5.7
Triaged
Medium
Unassigned

Bug Description

Split from bug 1419541, comment #4:

Raghavendra D Prabhu (raghavendra-prabhu) wrote on 2015-03-04: #4
The problem here is that, the 'run as root requirement' (well, more of euid 0) is not checked for the sysctl:

=====
  elif ! sysctl -q -w vm.drop_caches=3
  then
    log_error "sysctl failed, check the error message for details"
    exit 1
  fi
===

So, that is the bug.

It is done, for instance, for thp setting

  if [ $(id -u) -ne 0 ]; then
    log_error "mysqld_safe must be run as root for setting transparent huge pages!"
    exit 1

Tags: pkg
tags: added: pkg
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1614

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.