Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 95604 - Running "/etc/init.d/* status" as non-root still broken in new baselayout
Summary: Running "/etc/init.d/* status" as non-root still broken in new baselayout
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-09 13:30 UTC by Stuart Shelton
Modified: 2005-06-09 17:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2005-06-09 13:30:15 UTC
Continuing from Bug 85892:

After installing the new sys-apps/baselayout-1.11.12-r4 the following occurs:

# /etc/init.d/net.eth0 status
 * status:  started
$ /etc/init.d/net.eth0 status
 *  Could not create needed directory '/var/lib/init.d/softscripts'!
 *  Could not create needed directory '/var/lib/init.d/snapshot'!
 *  Could not create needed directory '/var/lib/init.d/options'!
 *  Could not create needed directory '/var/lib/init.d/started'!
 * Caching service dependencies ...
rm: cannot remove `/var/lib/init.d/depcache': Permission denied
rm: cannot remove `/var/lib/init.d/deptree': Permission denied
rm: cannot remove `/var/lib/init.d/broken/*': Permission denied
rm: cannot remove `/var/lib/init.d/snapshot/*': Permission denied
/bin/mktemp: cannot create temp file /var/lib/init.d/depcache.XrbzEUT: Permission denied
 * Failed to create temporary cache!
bash: /var/lib/init.d/depcache: Permission denied
rm: cannot remove `/var/lib/init.d/deptree': Permission denied
:0: assertion failed: system(rm -f /var/lib/init.d/deptree)
gawk: /lib/rcscripts/awk/gendepends.awk:440: fatal: can't redirect to `/var/lib/init.d/deptree' (Permission denied)
touch: creating `/var/lib/init.d/depcache': Permission denied
touch: creating `/var/lib/init.d/deptree': Permission denied
 * Failed to cache service dependencies                                   [ !! ]

 * Error running '/sbin/depscan.sh'!
 * Please correct any problems above.

... so it looks as if an unpriviledged user still can't check to see if certain services have been started.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-06-09 14:07:16 UTC
Works here:

j__m@testbox ~ $ /etc/init.d/net.eth0 status
 * status:  started
Comment 2 Stuart Shelton 2005-06-09 15:04:33 UTC
Hmm - well, as you can see, mine certainly isn't working!

Could you suggest anything I could try/trace/check the permissions on to fix this?

svcmount = no in /etc/conf.d/rc, incidentally...

What are the permissions on your /var/lib/init.d directory?
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-06-09 15:17:16 UTC
(In reply to comment #2)
> What are the permissions on your /var/lib/init.d directory?

$ ls -la /var/lib/init.d
total 40
drwxr-xr-x   6 root root   180 Jun  9 19:39 .
drwxr-xr-x  12 root root   320 May 31 18:25 ..
-rw-------   1 root root 22980 Jun  9 19:39 depcache
-rw-r--r--   1 root root 12027 Jun  9 19:39 deptree
drwxr-xr-x   2 root root    40 Jun  4 16:59 options
drwxr-xr-x   2 root root    40 Jun  9 19:37 snapshot
-rw-r--r--   1 root root     8 Jun  4 16:59 softlevel
drwxr-xr-x   2 root root   660 Jun  4 16:59 softscripts
drwxr-xr-x   2 root root   680 Jun  6 23:21 started
Comment 4 Stuart Shelton 2005-06-09 17:14:44 UTC
Hmm - seems my init.d directory was wrong, it had permissions 644.  I don't know
how this might have happened...

I've corrected that to 755, and have:

$ ls -la /var/lib/init.d/
total 160K
drwxr-xr-x   6 root root 4.0K Jun 10 01:06 .
drwxr-xr-x  35 root root 4.0K Jun  6 13:07 ..
-rw-------   1 root root  73K Jun 10 01:06 depcache
-rw-r--r--   1 root root  40K Jun 10 01:06 deptree
-rw-r--r--   1 root root 9.1K Jun  9 10:11 envcache
drwxr-xr-x   2 root root 4.0K Jun 10 00:21 options
drwxr-xr-x   2 root root 4.0K Jun 10 00:26 snapshot
-rw-r--r--   1 root root    8 Jun 10 00:22 softlevel
drwxr-xr-x   2 root root 4.0K Jun 10 00:22 softscripts
drwxr-xr-x   2 root root 4.0K Jun 10 00:44 started

... but even with this, I get the following:

$ /etc/init.d/net.eth0 status
/lib/rcscripts/sh/rc-services.sh: line 22: /var/lib/init.d/deptree: No such file
or directory

 * Dependency info is missing!  Please run

 *   # /sbin/depscan.sh

 * to fix this.

Update: Strange... ran it a second time, and everything works just fine.