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

    Join Date
    Jun 2012
    Rep Power

    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. Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2006
    Rep Power
    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