Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sudo: how to do this?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
petrjanda
Veteran
Veteran


Joined: 05 Sep 2003
Posts: 1557
Location: Brno, Czech Republic

PostPosted: Sun Jul 27, 2008 4:25 am    Post subject: sudo: how to do this? Reply with quote

I need to allow sudo root access with commands like rm, vi, less, more, mkdir and nano for a person, but only in the directory /usr/websites.

How can I do this?

Thanks,
Petr
_________________
There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5947

PostPosted: Sun Jul 27, 2008 4:32 am    Post subject: Reply with quote

Moved from Off the Wall to Networking & Security.
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
aronparsons
Tux's lil' helper
Tux's lil' helper


Joined: 04 Oct 2004
Posts: 117
Location: Virginia

PostPosted: Sun Jul 27, 2008 7:55 am    Post subject: Reply with quote

I'd be wary of using sudo for this. Groups and permissions would probably be a better solution in a directory that probably doesn't hold system-related files.

If you really want to do this on root owned files and sudo, you'll want to make use of the NOEXEC option for programs that allow commands to be run from within them (e.g. Vi). You can configure the commands allowed in sudo to be something like "/usr/bin/vim /usr/websites/*", but it will require the full path to the file to be used.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum