Bug 133409 - app-backup/bobs-0.6.2-r1 access violation
|
Bug#:
133409
|
Product: Gentoo Linux
|
Version: 2006.0
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: app-backup@gentoo.org
|
Reported By: net1957@free.fr
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: app-backup/bobs-0.6.2-r1 access violation
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2006-05-15 12:39 0000
|
After corection (bug 133199) and re-emerge of php with the good USE flag the
install faild. I got the folowing error :
make install-data-hook
make[3]: Entering directory `/var/tmp/portage/bobs-0.6.2-r1/work/bobs-0.6.2'
********** IMPORTANT **********
/sbin/chkconfig was not found.
For bobs to run properly you must insert
the following line into your system startup script:
/etc/init.d/cmdloopd start
This will start the bobs background service.
See the INSTALL document for more information.
*******************************
/etc/init.d/cmdloopd start
Starting cmdloop: OK
make[3]: Leaving directory `/var/tmp/portage/bobs-0.6.2-r1/work/bobs-0.6.2'
make[2]: Leaving directory `/var/tmp/portage/bobs-0.6.2-r1/work/bobs-0.6.2'
make[1]: Leaving directory `/var/tmp/portage/bobs-0.6.2-r1/work/bobs-0.6.2'
ACCESS DENIED open_wr: /var/log/bobs.log
/etc/init.d/cmdloopd: line 25: /var/log/bobs.log: Permission denied
* ebuild fault: file
'/usr/share/webapps/bobs/0.6.2-r1/htdocs/inc/excludes/default.excludelist' not
found
* Please report this as a bug at http://bugs.gentoo.org/
!!! ERROR: app-backup/bobs-0.6.2-r1 failed.
!!! Function webapp_checkfileexists, Line 81, Exitcode 0
!!! ebuild fault: file
'/usr/share/webapps/bobs/0.6.2-r1/htdocs/inc/excludes/default.excludelist' not
found
!!! If you need support, post the topmost build error, NOT this status message.
--------------------------- ACCESS VIOLATION SUMMARY
---------------------------
LOG FILE = "/var/log/sandbox/sandbox-app-backup_-_bobs-0.6.2-r1-1474.log"
open_wr: /var/log/bobs.log
--------------------------------------------------------------------------------
First error : access denied !!!
but if you run "/etc/init.d/cmdloopd start" from root it's OK (stupid thing to
say !!!! root has all rights no ?)
Second error : the path
"/usr/share/webapps/bobs/0.6.2-r1/htdocs/inc/excludes/default.excludelist" is
incorrect .
It is "/usr/share/webapps/bobs/0.6.2/htdocs/inc/excludes/default.excludelist"
on the system
for emerge --info look at bug 133199
Hope this can help.
In the bug you've posted bug 133199 there's no emerge --info, but no need.
I will get the sandbox violations fixed. It seems the Makefile is calling that
external script! I'll have to see if I can work around that.
These sandbox violations should be fixed now, and in ~arch.
Sorry, for the emerge --info it was bug 133198.
I tried a 3time this package in (~x86) and got this result :
/bin/install -c -m 644 search.php
/var/tmp/portage/bobs-0.6.2-r1/image//usr/share/webapps/bobs/0.6.2-r1/htdocs/winc/search.php
make[2]: Leaving directory
`/var/tmp/portage/bobs-0.6.2-r1/work/bobs-0.6.2/winc'
make[1]: Leaving directory
`/var/tmp/portage/bobs-0.6.2-r1/work/bobs-0.6.2/winc'
make[1]: Entering directory `/var/tmp/portage/bobs-0.6.2-r1/work/bobs-0.6.2'
make[2]: Entering directory `/var/tmp/portage/bobs-0.6.2-r1/work/bobs-0.6.2'
make[2]: Nothing to be done for `install-exec-am'.
./mkinstalldirs /var/lib/bobsdata/current/process/cmd \
/var/lib/bobsdata/current/process/mounts \
/var/lib/bobsdata/current/process/session
mkdir -p -- /var/lib/bobsdata/current/process/cmd
/var/lib/bobsdata/current/process/mounts
/var/lib/bobsdata/current/process/session
ACCESS DENIED mkdir: /var/lib/bobsdata
mkdir: cannot create directory `/var/lib/bobsdata': Permission denied
ACCESS DENIED mkdir: /var/lib/bobsdata
mkdir: cannot create directory `/var/lib/bobsdata': Permission denied
ACCESS DENIED mkdir: /var/lib/bobsdata
mkdir: cannot create directory `/var/lib/bobsdata': Permission denied
make[2]: *** [install-data-local] Error 1
make[2]: Leaving directory `/var/tmp/portage/bobs-0.6.2-r1/work/bobs-0.6.2'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/var/tmp/portage/bobs-0.6.2-r1/work/bobs-0.6.2'
make: *** [install-recursive] Error 1
!!! ERROR: app-backup/bobs-0.6.2-r1 failed.
!!! Function src_install, Line 63, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.
--------------------------- ACCESS VIOLATION SUMMARY
---------------------------
LOG FILE = "/var/log/sandbox/sandbox-app-backup_-_bobs-0.6.2-r1-13325.log"
mkdir: /var/lib/bobsdata
mkdir: /var/lib/bobsdata
mkdir: /var/lib/bobsdata
--------------------------------------------------------------------------------
Remark : I'm using vhosts USE flag.
That's interesting. I can emerge it here with no trouble at all. Let me try
with +vhosts.
Wow, what a mistake. On my server I had -sandbox set. Even still with sandbox,
userpriv, and usersandbox I've tried this many times and still I can't
reproduce it.
My steps are:
emerge -C bobs ; rm -rf /var/www/localhost/htdocs/bobs/ /var/lib/bobsdata/
/usr/share/webapps/bobs/ /var/db/webapps/bobs /var/bobsdata
USE='vhosts' emerge bobs.
Did you emerge --sync after I closed the bug? If not please do and try again
running my commands, substituting the proper 'htdocs' dir.
Can you also post emerge --info? This seems like an odd situation. The sed
statement is working for me but not for others so I'm curious as to your
environment.
(In reply to comment #6)
> Can you also post emerge --info? This seems like an odd situation. The sed
> statement is working for me but not for others so I'm curious as to your
> environment.
Hello,
I did that :
emerge -C bobs ; rm -rf /var/www/bobs.sk.loc/bobs/ /var/lib/bobsdata/
/usr/share/webapps/bobs/ /var/db/webapps/bobs /var/bobsdata
and then emerged bobs :
I got this 2 from dispatch-conf and did update it.
--- /etc/cron.daily/backup.php 2006-05-13 11:02:39.000000000 +0200
+++ /etc/cron.daily/._cfg0000_backup.php 2006-05-17 21:19:23.000000000
+0
200
@@ -5,7 +5,7 @@
// Can't get siteroot from class_config because this file
// is in a cron directory, not the bobs site root.
-$siteroot = '/usr/share/webapps/bobs/0.6.2/htdocs';
+$siteroot = '/usr/share/webapps/bobs/0.6.2-r1/htdocs';
require($siteroot . '/inc/class_config.php');
require($siteroot . '/inc/class_server.php');
--- /etc/init.d/cmdloopd 2006-05-13 11:02:39.000000000 +0200
+++ /etc/init.d/._cfg0000_cmdloopd 2006-05-17 21:19:23.000000000 +0200
@@ -8,8 +8,8 @@
# processname: cmdloop
# cmdloop directory
-CMDLOOP_DIR=/var/bobsdata/current/process
-LOGFILE=/var/log/bobs.log
+CMDLOOP_DIR=/var/lib/bobsdata/current/process
+LOGFILE=/var/lib/log/bobs.log
# Does cmdloop script exist?
[ -f ${CMDLOOP_DIR}/cmdloop ] || exit 1
/* ----------------------------------------- */
after that I installed the web with :
webapp-config -I -h bobs.sk.loc -d bobs bobs 0.6.2-r1
and connected to bobs.sk.loc/bobs/admin.php : (see attached file)
run :
Run these commands as root:
chown apache.root /usr/share/webapps/bobs/0.6.2-r1/htdocs/inc/servers
chmod 755 /usr/share/webapps/bobs/0.6.2-r1/htdocs/inc/servers
and
chown apache.root /var/lib/bobsdata/current
chmod 755 /var/lib/bobsdata/current
after that the admin page was ok.
I added a host to backup (thru Rsync daemon)
And started cmdloopd and got :
gentoo-vm ~ # /etc/init.d/cmdloopd start
Starting cmdloop: /etc/init.d/cmdloopd: line 25: /var/lib/log/bobs.log: No such
file or directory
OK
So changed the cmdloopd script :
LOGFILE=/var/log/bobs.log
restarted :
gentoo-vm ~ # /etc/init.d/cmdloopd start
Starting cmdloop: OK
gentoo-vm ~ #
Click backup now and get :
Warning: fopen(/var/lib/bobsdata/current/process/last_pid) [function.fopen]:
failed to open stream: Permission denied in
/var/www/bobs.sk.loc/htdocs/bobs/inc/class_backup.php on line 546
Warning: fputs(): supplied argument is not a valid stream resource in
/var/www/bobs.sk.loc/htdocs/bobs/inc/class_backup.php on line 548
Warning: fclose(): supplied argument is not a valid stream resource in
/var/www/bobs.sk.loc/htdocs/bobs/inc/class_backup.php on line 549
Warning: chmod() [function.chmod]: No such file or directory in
/var/www/bobs.sk.loc/htdocs/bobs/inc/class_backup.php on line 550
Warning: file(/var/lib/bobsdata/current/process/last_pid) [function.file]:
failed to open stream: No such file or directory in
/var/www/bobs.sk.loc/htdocs/bobs/inc/class_backup.php on line 553
........./........
My knowledge with linux is not so big, so I need help !!!
One more information :
The install dirs are not the same this time ad the previous install :
usr/share/webapps/bobs/0.6.2/
see attachements.
serge
Ok, now the sandbox violation is properly fixed.
Automake was being called in some cases before, thus blowing away the patch to
Makefile.in.
Now Makefile.am is patched, and Makefile.in generated from it.
Tested on ~ppc.
(In reply to comment #15)
> Ok, now the sandbox violation is properly fixed.
> Automake was being called in some cases before, thus blowing away the patch to
> Makefile.in.
> Now Makefile.am is patched, and Makefile.in generated from it.
> Tested on ~ppc.
I reemerged the appli. The install run ok but if you run a backup you get :
Warning: fopen(/var/lib/bobsdata/current/process/cmd/cmd.1147914607.php)
[function.fopen]: failed to open stream: Permission denied in
/var/www/bobs.sk.loc/htdocs/bobs/inc/class_backup.php on line 558
Warning: fputs(): supplied argument is not a valid stream resource in
/var/www/bobs.sk.loc/htdocs/bobs/inc/class_backup.php on line 562
Check your permissions for every item in this path:
/var/lib/bobsdata/current/process/cmd/cmd.1147914607.php
eg:
ls -ld /var /var/lib /var/lib/bobsdata /var/lib/bobsdata/current
/var/lib/bobsdata/current/process /var/lib/bobsdata/current/process/cmd
/var/lib/bobsdata/current/process/cmd/cmd.*.php
And compare it with the user that your backup is running as.
Created an attachment (id=87007) [details]
log of install 18/05/2006
I did run after that :
webapp-config -I -h bobs.sk.loc -d bobs bobs 0.6.2-r1*
CONFIG_PROTECT="/var/www/bobs.sk.loc/htdocs/bobs//inc/excludes" etc-update
CONFIG_PROTECT="/var/www/bobs.sk.loc/htdocs/bobs//inc/servers" etc-update
/etc/init.d/cmdloopd start
(In reply to comment #17)
> Check your permissions for every item in this path:
> /var/lib/bobsdata/current/process/cmd/cmd.1147914607.php
> eg:
> ls -ld /var /var/lib /var/lib/bobsdata /var/lib/bobsdata/current
> /var/lib/bobsdata/current/process /var/lib/bobsdata/current/process/cmd
> /var/lib/bobsdata/current/process/cmd/cmd.*.php
> And compare it with the user that your backup is running as.
Result :
gentoo-vm ~ # ls -ld /var /var/lib /var/lib/bobsdata /var/lib/bobsdata/current
/var/lib/bobsdata/current/process /var/lib/bobsdata/current/process/cmd
/var/lib/bobsdata/current/process/cmd/cmd.*.php
drwxr-xr-x 15 root root 4096 May 17 21:19 /var
drwxr-xr-x 13 root root 4096 May 17 21:19 /var/lib
drwxr-xr-x 5 root root 4096 May 18 03:10 /var/lib/bobsdata
drwxr-xr-x 4 apache root 4096 May 18 03:10 /var/lib/bobsdata/current
drwxr-xr-x 3 root root 4096 May 18 22:36 /var/lib/bobsdata/current/process
drwxr-xr-x 2 root root 4096 May 18 03:10
/var/lib/bobsdata/current/process/cmd
-rwxrwxrwx 1 root root 5978 May 18 03:10
/var/lib/bobsdata/current/process/cmd/cmd.1147914604.php
-rwxrwxrwx 1 root root 5965 May 18 03:10
/var/lib/bobsdata/current/process/cmd/cmd.1147914605.php
What user do you mean ?
I'm logged in as admin in bobs web.
I mean system user the backup was running as.
If you are getting that error from a webpage, try this:
chown apache /var/lib/bobsdata/current/process/cmd
But I see a bunch of other insecurities in there that may cause problems with
bobs in future.
(In reply to comment #20)
> I mean system user the backup was running as.
> If you are getting that error from a webpage, try this:
> chown apache /var/lib/bobsdata/current/process/cmd
> But I see a bunch of other insecurities in there that may cause problems with
> bobs in future.
That was the trick ! Thank's
I'm going to try a abckup now.
(In reply to comment #21)
> That was the trick ! Thank's
Seems to be fixed now. Thanks Robin.