[Users] "permission denied" error on CT rc.local script to add
custom commands by regular user with full root rights granted via sudo
Sharp
sharp at thesharp.ru
Sat Jun 25 13:14:47 EDT 2011
On Sat, Jun 25, 2011 at 8:56 PM, <knawnd at gmail.com> wrote:
> $ sudo echo "# oneadmin test" >> /vz/private/164/etc/rc.d/rc.local
> -bash: /vz/private/164/etc/rc.d/rc.local: Permission denied
>
> Does someone have any ideas what can be the reason of insufficient
> privileges for regular user with full root rights granted via sudo?
That's simple. Your echo command is running as root because of sudo.
But the shell that's redirecting echo's output is still running as
you.
You can become a root and do that command without any problems.
More information about the Users
mailing list