[Vserver] what am i doing wrong with vserver exec?

2005-10-04 Thread Chuck
I am trying to execute this function from a cron off the host and it isnt 
working.

/usr/sbin/vserver prometheus exec /bin/rm 
-f /var/spool/qmailscan/quarantine/new/*


darn wordwrap.

I am trying not to install cron in guests unless I absolutely must.

-- 

Chuck

...and the hordes of M$*ft users descended upon me in their anger,
and asked 'Why do you not get the viruses or the BlueScreensOfDeath
or insecure system troubles and slowness or pay through the nose 
for an OS as *we* do?!!', and I answered...'I use Linux'. 
The Book of John, chapter 1, page 1, and end of book


___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] what am i doing wrong with vserver exec?

2005-10-04 Thread Christian Heim
On Tuesday 04 October 2005 14:20, Chuck wrote:
 I am trying to execute this function from a cron off the host and it isnt
 working.

 /usr/sbin/vserver prometheus exec /bin/rm
 -f /var/spool/qmailscan/quarantine/new/*

Well thats how it works here :)

/usr/bin/vserver ns exec rm -rf /var/tmp/portage/

or even

/usr/bin/vserver mirror exec /root/bin/rsync-mirror-os.sh
-- 
Christian Heim [EMAIL PROTECTED]
Gentoo Linux Developer (VServer)


pgpB4uu96PjwY.pgp
Description: PGP signature
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] what am i doing wrong with vserver exec?

2005-10-04 Thread Chuck
On Tuesday 04 October 2005 08:43 am, Christian Heim wrote:

odd. it doesnt give any error yet the files remain. wonder if it could be 
permissions although as root it should not matter to a script executed as 
root...

this is one of the files to be deleted


-rw---  1 qscand nofiles 86449 Oct  4 06:38 prometheus112842211069422533

Chuck

 On Tuesday 04 October 2005 14:20, Chuck wrote:
  I am trying to execute this function from a cron off the host and it isnt
  working.
 
  /usr/sbin/vserver prometheus exec /bin/rm
  -f /var/spool/qmailscan/quarantine/new/*
 
 Well thats how it works here :)
 
 /usr/bin/vserver ns exec rm -rf /var/tmp/portage/
 
 or even
 
 /usr/bin/vserver mirror exec /root/bin/rsync-mirror-os.sh
 -- 
 Christian Heim [EMAIL PROTECTED]
 Gentoo Linux Developer (VServer)
 

-- 

Chuck

...and the hordes of M$*ft users descended upon me in their anger,
and asked 'Why do you not get the viruses or the BlueScreensOfDeath
or insecure system troubles and slowness or pay through the nose 
for an OS as *we* do?!!', and I answered...'I use Linux'. 
The Book of John, chapter 1, page 1, and end of book


___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] what am i doing wrong with vserver exec?

2005-10-04 Thread Enrico Scholz
[EMAIL PROTECTED] (Stephen Harris) writes:

 /usr/sbin/vserver prometheus exec /bin/rm -f 
 /var/spool/qmailscan/quarantine/new/*
 ...
 However, why not just use the host to remove the files?

Because of symlinks like

| /vservers/prometheus/var/spool/qmailscan/quarantine/new - /etc

or an other filesystem layout because of different namespaces.


The security relevant part of the first issue can be workarounded by
tools like 'chroot-sh' and the second issue by 'vnamespace -e'. But
'vserver ... exec' is more cleaner and solves the functionality relevant
part of the first issue also.


   /bin/rm -f /vservers/prometheus/var/spool/qmailscan/quarantine/new/*




Enrico


pgpAiBXOlYLkc.pgp
Description: PGP signature
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver