Question

Change Ownership of a folder

Posted November 6, 2014 3.9k views

Hi Guys am trying to change ownership of a dir using this command:

“sudo chown -R test:test test/”.

However, am getting this message “ forge is not in the sudoers file. This incident will be reported. ”

I don’t know what this means can you please help?

Thanks

Yomi

2 comments
  • You are trying to sudo with a user which is not in the sodoers file.

    Try to run visudo as root and add the user (test) to the list by adding the following line:

    test ALL=(ALL:ALL) ALL

    Now re-login with the user test and sudo should be working properly.

    [off topic]
    Please note that adding a user test to allow to sudo might not be the best solution from a security perspective. I hope your password for this user is strong.
    [/off topic]

  • This problem as ITNerdbox said, will be solved by adding test user in visudo. Good job ITNerdbox.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Actually, that won’t help.

test is not the user who is running the command, forge is.

This means that you need to add forge to the sudoers file with appropriate permissions to run the chown command, either with or without having to enter a password.

The problem you have is that this user, forge, is not in the sudoers list, and as such is unable to add themselves to it, this has to be done by root or another user with sudo privileges as ITNerdBox stated.

Submit an Answer