#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    7
    Rep Power
    0

    How to get su priveleges


    I am trying to replace the my.cnf file in my MYSQl folder in a unix machine but the file has write-enabled protection. How do I bypass this since I need to make edits to the original file and replace it? I also need to delete file that are write-enabled but I cannot. Is there a way I can perform these tasks?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,446
    Rep Power
    1751
    The 'usual' ways would be to use the same user that mysql was installed as (often mysql), the root user, the su command to 'become' a privileged user (either mysql or root), or sudo to do the same thing as su.
    It is best to leave the permissions of the file as they are, generally such files are 'write-protected' for a reason!

    To get 'su privileges' you will need to know the password for the user you wil lbe switching to. For sudo (if installed and configured) that may not be needed, depending on what you are authorised to do (in the sudoers config file). Of course, you'll need to be root to update the sudo configuration ...
    Last edited by SimonJM; June 4th, 2012 at 09:18 AM.
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc

IMN logo majestic logo threadwatch logo seochat tools logo