Tutorial: Fixing sudo Permission Denied Errors

Posted by Sander_Marechal on Jul 8, 2010 4:57 AM EDT
ServerWatch; By Juliet Kemp
Mail this story
Print this story

If you're using Sudo, you've probably already discovered that the increased privileges apply only to the first command typed and don't extend to any input or output redirection. For example: "sudo iptables -L > /etc/iptables" will give you a 'Permission denied' error because the shell interprets the first command (with sudo), then pipes it into the second command (without sudo). One solution to this is to jump straight into the root user shell with su. However, this ignores all the many very good reasons to use sudo in the first place (including logging, ticketing and a lower risk of accidentally doing something foolish because you've left a root shell lying around). Here's a better solution.

Full Story

  Nav
» Read more about: Story Type: News Story

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.