OpenVZ Forum


Home » Mailing lists » Users » "permission denied" error on CT rc.local script to add custom commands by regular
Re: "permission denied" error on CT rc.local script to add custom commands by reg [message #42990 is a reply to message #42989] Sat, 25 June 2011 17:14 Go to previous messageGo to previous message
Sharp is currently offline  Sharp
Messages: 14
Registered: March 2011
Junior Member
On Sat, Jun 25, 2011 at 8:56 PM, <knawnd@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.
 
Read Message
Read Message
Read Message
Previous Topic: vzdev-3.3.13-1.4.swsoft
Next Topic: Strange mount problem
Goto Forum:
  


Current Time: Mon Sep 16 22:27:54 GMT 2024

Total time taken to generate the page: 0.04704 seconds