sudo not working
lists at kittypee.com
Wed Jan 18 09:21:22 MST 2012
On Tue, Jan 17, 2012 at 8:07 PM, Make Compile <makecompile at yahoo.com> wrote:
> Thank you all for the reply. I have one problem right now. I want to give user specific access to be able to write on filesystem directory sample is /opt the user is permitted denied on creating directory. any suggestion on how to do that on sudo.
> andrew localhost = /bin/mkdir /opt
> am i missing something here? Thanks
Yes, that is not the purpose of sudo.
In order to control access to files and directories you should use
Unix permissions or ACLs.
sudo is used to allow users to run commands as other users (often root).
In your example, if you want to give permission to add directories
inside of /opt to a specific user, or group of users, you would do
something like this:
* A specific user only:
chown username /opt
- since /opt permissions already allow writing by the owner, this is
* A group of users:
usermod -a -G newgroupname username
chgrp newgroupname /opt
chmod g+w /opt
- this creates a new group, adds a user to the group, makes /opt
belong to the group, and makes /opt writable by the group -
More information about the PLUG