No Locate for User
am 25.04.2005 06:27:06 von heisspf
Hi,
Slackware 10.1 kernel 2.4.29
I upgraded again Dropline Gnome from 2.8.3 to 2.10 this time with no problems
regarding certain programs like gxine not opening.
However, I cannot use the command "locate" as a user any longer. I get the
following error:
@~:$ locate fips
warning: locate: could not open database: /var/lib/slocate/slocate.db:
Permission denied
As su there is no problem.
I did not do anything to this file in fact it has the same permissions as in
my Fedora box where a user can do "locate" w/o problem just like before the
upgrade in slack. Updateddb is done daily by cron root.
:# ls -l /var/lib/slocate
total 4176
-rw-r----- 1 root slocate 4275159 2005-04-24 18:06 slocate.db
How to resolve?
Thanks & regards
--
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 25.04.2005 07:06:04 von Ray Olszewski
Peter H. wrote:
> Hi,
>
> Slackware 10.1 kernel 2.4.29
>
> I upgraded again Dropline Gnome from 2.8.3 to 2.10 this time with no problems
> regarding certain programs like gxine not opening.
>
> However, I cannot use the command "locate" as a user any longer. I get the
> following error:
>
> @~:$ locate fips
> warning: locate: could not open database: /var/lib/slocate/slocate.db:
> Permission denied
>
> As su there is no problem.
>
> I did not do anything to this file in fact it has the same permissions as in
> my Fedora box where a user can do "locate" w/o problem just like before the
> upgrade in slack. Updateddb is done daily by cron root.
>
> :# ls -l /var/lib/slocate
> total 4176
> -rw-r----- 1 root slocate 4275159 2005-04-24 18:06 slocate.db
>
> How to resolve?
I don't know why ... that is, how ... your Fedora host works with these
permissions, but I'm not surprised that your Slackware host presents
problems with them. On Debian, the corresponding file (in a different
location, but the functional equivalent) is mode 644, the mode you'd
expect for a file that is to be readable by all users:
ray@kuryakin:~$ ls -l /var/cache/locate/locatedb
-rw-r--r-- 1 root root 1089123 Apr 24 06:25 /var/cache/locate/locatedb
So try changing the mode to 644 with chmod. Or try adding all users who
need to use locate to the group slocate (in /etc/group ... perhaps
Fedora uses this trick to make locate work in mode 640?).
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 25.04.2005 10:11:31 von heisspf
On Sun, 24 Apr 2005 22:06:04 -0700
Ray Olszewski wrote:
> Peter H. wrote:
> > Hi,
> >
> > Slackware 10.1 kernel 2.4.29
> >
> > I upgraded again Dropline Gnome from 2.8.3 to 2.10 this time with no
problems
> > regarding certain programs like gxine not opening.
> >
> > However, I cannot use the command "locate" as a user any longer. I get the
> > following error:
> >
> > @~:$ locate fips
> > warning: locate: could not open database: /var/lib/slocate/slocate.db:
> > Permission denied
> >
> > As su there is no problem.
> >
> > I did not do anything to this file in fact it has the same permissions as
in
> > my Fedora box where a user can do "locate" w/o problem just like before
the
> > upgrade in slack. Updateddb is done daily by cron root.
> >
> > :# ls -l /var/lib/slocate
> > total 4176
> > -rw-r----- 1 root slocate 4275159 2005-04-24 18:06 slocate.db
> >
> > How to resolve?
>
> I don't know why ... that is, how ... your Fedora host works with these
> permissions, but I'm not surprised that your Slackware host presents
> problems with them. On Debian, the corresponding file (in a different
> location, but the functional equivalent) is mode 644, the mode you'd
> expect for a file that is to be readable by all users:
>
> ray@kuryakin:~$ ls -l /var/cache/locate/locatedb
> -rw-r--r-- 1 root root 1089123 Apr 24 06:25 /var/cache/locate/locatedb
>
> So try changing the mode to 644 with chmod. Or try adding all users who
> need to use locate to the group slocate (in /etc/group ... perhaps
> Fedora uses this trick to make locate work in mode 640?).
>
Since I am using Linux beginning with ReaHat 5.1 then later switching to
slackware I always used "locate" as user and never bothered to look at the
permission of /var/lib/slocate since there was obviously no need.
Before I posted this mail I tried various permission for slocate even my user
name as owner and get the same error: Permission denied.
That's why I am at a loss. I checked the dropline forum and could not find a
reference. Might have to post one.
Regards
Peter
--
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 25.04.2005 10:33:39 von heisspf
ray@comarre.com said:
> Or try adding all users who need to use locate to the group slocate (in /
> etc/group ... perhaps Fedora uses this trick to make locate work in mode
> 640?).
Fedora: /etc/group/slocate:x:21
Slackware: /etc/group/slocate::21
I added user /etc/group/slocate::21:user
Same: Permission denied
Regards
--
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 25.04.2005 18:40:17 von Ray Olszewski
Peter wrote:
[...]
>>I don't know why ... that is, how ... your Fedora host works with these
>>permissions, but I'm not surprised that your Slackware host presents
>>problems with them. On Debian, the corresponding file (in a different
>>location, but the functional equivalent) is mode 644, the mode you'd
>>expect for a file that is to be readable by all users:
>>
>> ray@kuryakin:~$ ls -l /var/cache/locate/locatedb
>> -rw-r--r-- 1 root root 1089123 Apr 24 06:25 /var/cache/locate/locatedb
>>
>>So try changing the mode to 644 with chmod. Or try adding all users who
>>need to use locate to the group slocate (in /etc/group ... perhaps
>>Fedora uses this trick to make locate work in mode 640?).
>>
> Since I am using Linux beginning with ReaHat 5.1 then later switching to
> slackware I always used "locate" as user and never bothered to look at the
> permission of /var/lib/slocate since there was obviously no need.
>
> Before I posted this mail I tried various permission for slocate even my user
> name as owner and get the same error: Permission denied.
>
> That's why I am at a loss. I checked the dropline forum and could not find a
> reference. Might have to post one.
It is always difficult to give advice in response to an incomplete
problem description. I suggested changing the mode because you did not
mention having done so in your first report. From what you just wrote
this time ("I tried various permission for slocate"), I *still* cannot
tell if you tried what I actually suggested -- using chmod to set the
database file (slocate.db) to mode 644.
Also, I am unclear as to what you tried changing the mode of. The issue
is NOT with the directory "/var/lib/slocate". It is with the file
"/var/lib/slocate/slocate.db". Since you say you tried things with
"slocate" rather than "slocate.db", I am uncertain as to which of the
two you were modifying.
So ... I suggest you try running (as root) this specific command:
chmod 644 /var/lib/slocate/slocate.db
Then run "ls -l /var/lib/slocate/slocate.db" to make sure the change
took effect.
Then, as an ordinary user, attempt to run the "locate" command and see
if the error persists.
If it does not, this is your fix. (Though you may need to confirm that a
run of "updatedb" preserves the 644 permissions.)
If it does, then round up the usual suspects:
ls -l /var/lib/slocate/slocate.db
ls -l /usr/bin/locate (or wherever Slackware puts it)
ldd /usr/bin/locate
And, as you did before, quote the actual command you ran and the actual,
exact error message you got.
See if the Dropline install affected any of the libs identified by the
second command. (You'll recall at the time of your first problem my
expressing skepticism that someone on the Dropline list could assure you
that xmms was the "only" app affected ... ANY change to libc6 can be
far-reaching.)
Also check "ls -l /usr/bin/locate" on the Fedora host ... I'm still
curious as to how it manages to use mode 640, so I (and you) want to see
if it is doing something with the suid or sgid bit that the Slackware
version is no longer doing.
(BTW, can some Slackware user here with a working locate command run "ls
-l /usr/bin/locate" and "ls -l /var/lib/slocate/slocate.db" and post the
results, so Peter can see what a working Slackware system is *supposed*
to look like?)
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 26.04.2005 06:18:08 von heisspf
Sorry for not expressing myself clearly!
ray@comarre.com said:
> From what you just wrote this time ("I tried various permission for
> slocate"), I *still* cannot tell if you tried what I actually suggested --
> using chmod to set the database file (slocate.db) to mode 644.
Yes I did chmod 644 /var/lib/slocate/slocate.db and it changed nothing.
ray@comarre.com said:
> Since you say you tried things with "slocate" rather than "slocate.db", I am
> uncertain as to which of the two you were modifying.
I did all the changes on slocate.db. I even made myself the owner. Even then I
get Permission denied.
Updatedb changes permissions of slocate.db back to -rw-r----- 1 root slocate.
ray@comarre.com said:
> If it does, then round up the usual suspects:
> ls -l /var/lib/slocate/slocate.db
> ls -l /usr/bin/locate (or wherever Slackware puts it)
> ldd /usr/bin/locate
ls -l /var/lib/slocate/slocate.db
-rw-r--r-- 1 root slocate 6640136 2005-04-25 18:08 /var/lib/slocate/slocate.db
ls -l /usr/bin/locate
lrwxrwxrwx 1 root root 7 2005-03-08 17:45 /usr/bin/locate -> slocate
ldd /usr/bin/slocate
libc.so.6 => /lib/libc.so.6 (0x4001e000)
/lib/ld-linux.so.2 (0x80000000)
Fedora:
ls -l /var/lib/slocate/slocate.db
-rw-r----- 1 root slocate 2874826 2005-04-20 15:07
/mnt/rh9root/var/lib/slocate/slocate.db
ls -l /usr/bin/locate
-rwxr-sr-x 1 root slocate 26460 2004-10-20 /usr/bin/locate -> slocate
ldd /usr/bin/slocate
libc.so.6 => /lib/tls/libc.so.6 (0x004c7000)
/lib/ld-linux.so.2 (0x004ae000)
In Fedora libc-2.3.3.so in slackware libc-2.3.4.so
In Fedora /bin/locate is root:slocate in slackware root:root. I changed it to
root:slocate and still get Permission denied.
ray@comarre.com said:
> See if the Dropline install affected any of the libs identified by the
> second command.
libc-2.3.4.so is the one from the install CD.
@~:$ /mnt/rh9root/usr/bin/locate fips
warning: locate: could not open database: /var/lib/slocate/slocate.db:
Permission denied
warning: You need to run the 'updatedb' command (as root) to create the
database.
With this additional warning using the Fedora locate could it mean slocate.db
is not found by the user? this warning one gets if a new distro had been
installed or the data base had not been updated for some time.
To double check I booted into Fedora and "locate" run by user works as it has
always done as it did in slackware before I updated dropline.
Regards
--
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 26.04.2005 07:42:41 von Greg Olszewski
I suspect you'll simply need to do:
chmod 2755 $(which slocate)
chown root:slocate $(which slocate)
(which is probably the same as)
chmod 2755 /usr/bin/slocate
chown root:slocate /usr/bin/slocate
slocate considers the db file to be sensitive (as well it should). the
slocate binary needs to run as the slocate group to use it.
> @~:$ /mnt/rh9root/usr/bin/locate fips
> warning: locate: could not open database: /var/lib/slocate/slocate.db:
> Permission denied
> warning: You need to run the 'updatedb' command (as root) to create the
> database.
>
Um. This could be due to many things. Perhaps the partition is mounted
nosuid, and slocate isn't running with the right permissions. Perhaps
you've got a different version of slocate on fedora than slackware.
Running a binary from one version against data from another shouldn't be
expected to work. 'chroot /mnt/rh9root locate fips' ought to work fine.
have fun,
greg
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 26.04.2005 09:29:02 von heisspf
Thanks Greg but nothing doing.
ll /usr/bin/slocate
-rwxr-sr-x 1 root slocate 26652 2004-05-30 11:52 /usr/bin/slocate
@~:$ locate fips
warning: locate: could not open database: /var/lib/slocate/slocate.db:
Permission denied
noop@nwonknu.org said:
> 'chroot /mnt/rh9root locate fips' ought to work fine.
Yes as su and that is exactly what I want to avoid to go su for locate since I
use this command relatively frequently.
Regards
--
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 26.04.2005 09:44:42 von Greg Olszewski
Peter wrote:
> Thanks Greg but nothing doing.
>
> ll /usr/bin/slocate
> -rwxr-sr-x 1 root slocate 26652 2004-05-30 11:52 /usr/bin/slocate
>
/usr is mounted *without* nosuid, no?
"cat /proc/mounts | grep '/usr'"
and
"cat /proc/mounts | grep ' / '"
> @~:$ locate fips
> warning: locate: could not open database: /var/lib/slocate/slocate.db:
> Permission denied
>
grr. Frustrating.
what does 'ls -ld /var/lib/slocate' say?
does 'chmod 750 /var/lib/slocate/' or 'chown root:slocate
/var/lib/slocate' help (if it isn't rwxr-x--- root slocate already)?
If not, what does 'slocate -V' say?
How about
'ls -ld /var'
'ls -ld /var/lib'
also?
Thanks a bunch. Apologies if you've posted this output before and I
missed it.
> noop@nwonknu.org said:
>
>>'chroot /mnt/rh9root locate fips' ought to work fine.
>
>
> Yes as su and that is exactly what I want to avoid to go su for locate since I
> use this command relatively frequently.
>
totally understood. I was just trying to point out that it is unlikely
for the redhat slocate binary to work with the slackware data files.
hope this helps,
-greg
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 26.04.2005 10:27:07 von heisspf
On Tue, 26 Apr 2005 00:44:42 -0700
Greg Olszewski wrote:
> /usr is mounted *without* nosuid, no?
/usr is 755 and not mounted separately.
>
> "cat /proc/mounts | grep '/usr'"
cat /proc/mounts | grep '/usr'
/dev/hda9 /usr/local reiserfs rw 0 0
> and
> "cat /proc/mounts | grep ' / '"
cat /proc/mounts | grep ' / '
rootfs / rootfs rw 0 0 /dev/root / reiserfs rw 0 0
> what does 'ls -ld /var/lib/slocate' say?
drwxr-x--- 2 heisspf root 80 2005-04-26 11:42 /var/lib/slocate
> does 'chmod 750 /var/lib/slocate/' or 'chown root:slocate
> /var/lib/slocate' help (if it isn't rwxr-x--- root slocate already)?
ls -l /var/lib/slocate/
total 4180
-rw-r----- 1 root slocate 4278159 2005-04-26 11:42 slocate.db
ls -ld /var/lib/slocate
drwxr-x--- 2 heisspf root 80 2005-04-26 11:42 /var/lib/slocate
No
Yes it is
>
> If not, what does 'slocate -V' say?
Secure Locate 2.7 - Released January 24, 2003
> How about
> 'ls -ld /var'
drwxr-x--- 2 heisspf root 80 2005-04-26 11:42 /var/lib/slocate
In /etc/group
slocate:x:21:users
I added users
> 'ls -ld /var/lib'
drwx------ 24 root users 608 2005-03-21 09:43 /var/lib
---snip---
> -greg
>
Permission is still denied.
Thanks
--
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 26.04.2005 10:41:13 von Greg Olszewski
Peter wrote:
>
> drwxr-x--- 2 heisspf root 80 2005-04-26 11:42 /var/lib/slocate
>
ought to root:slocate (although current might be just fine) see below.
>
> ls -l /var/lib/slocate/
> total 4180
> -rw-r----- 1 root slocate 4278159 2005-04-26 11:42 slocate.db
>
should be fine.
> ls -ld /var/lib/slocate
> drwxr-x--- 2 heisspf root 80 2005-04-26 11:42 /var/lib/slocate
>
see above.
>
>>If not, what does 'slocate -V' say?
>
>
> Secure Locate 2.7 - Released January 24, 2003
>
Well, that makes me worry less. Same version and date that I'm
experimenting with.
>
>>How about
>>'ls -ld /var'
>
>
> drwxr-x--- 2 heisspf root 80 2005-04-26 11:42 /var/lib/slocate
>
that's not /var, it's /var/lib/slocate. No worries. for /var root:users
or root:root 755 should be fine. /var/lib/slocate ought to be
root:slocate 750. see above.
> In /etc/group
> slocate:x:21:users
> I added users
>
That's not going to help. The last field is a list of users, not groups.
It should be a moot point though, although it would be safer to remove
it (in case some software doesn't handle a unlookable user name (users)).
>
>>'ls -ld /var/lib'
>
>
> drwx------ 24 root users 608 2005-03-21 09:43 /var/lib
>
There it is!
slocate can't get to /var/lib/slocate at all. It doesn't have permission
to get to /var/lib, so it can't even see /var/lib/slocate.
my /var/lib is 0755 root:root
So I believe the following commands ought to make slocate happy (without
breaking anything else (hope))
either
chmod 755 /var/lib (more likely to work)
or
chmod 750 /var/lib (more paranoid)
chmod 755 /var (just in case)
chown root:slocate /var/lib/slocate
chmod 750 /var/lib/slocate
chmod 2775 /usr/bin/slocate
chown root:slocate /usr/bin/slocate
that ought to put your machine in a working (and relatively correct )
state. Hope I didn't miss anything.
hope this helps,
greg
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 26.04.2005 11:11:08 von heisspf
Un grande embrazzo.
chown root:root /var/lib
@~:$ locate fips
I closed my eyes.
I opened my eyes.
/usr/bin/openssl_fips_fingerprint
/usr/include/openssl/fips_rand.h
/usr/include/openssl/fips.h
By golly that was a hard one.
Thanks a lot!
--
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 26.04.2005 13:37:24 von chuck gelm net
Ray Olszewski wrote:
>
> (BTW, can some Slackware user here with a working locate command run
> "ls -l /usr/bin/locate" and "ls -l /var/lib/slocate/slocate.db" and
> post the results, so Peter can see what a working Slackware system is
> *supposed* to look like?)
I am not subscribed under this account so I'll privately post to Ray and
Peter. HTH, Chuck
Slackware 10.1.0
#ls -l /usr/bin/locate
lrwxrwxrwx 1 root root 7 2005-03-21 12:32 /usr/bin/locate -> slocate*
#ls -l /usr/bin/slocate
-rwxr-sr-x 1 root slocate 26652 2004-05-29 23:52 slocate*
#ls -l /var/lib/slocate/slocate*
-rw-r----- 1 root slocate 7890114 2005-04-26 04:42 /var/lib/slocate/slocate.db
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: No Locate for User
am 26.04.2005 13:53:04 von chuck gelm net
Peter wrote:
>Sorry for not expressing myself clearly!
>
>ray@comarre.com said:
>
>
>> From what you just wrote this time ("I tried various permission for
>>slocate"), I *still* cannot tell if you tried what I actually suggested --
>>using chmod to set the database file (slocate.db) to mode 644.
>>
>>
>
>Yes I did chmod 644 /var/lib/slocate/slocate.db and it changed nothing.
>
>ray@comarre.com said:
>
>
>>Since you say you tried things with "slocate" rather than "slocate.db", I am
>>uncertain as to which of the two you were modifying.
>>
>>
>
>I did all the changes on slocate.db. I even made myself the owner. Even then I
>get Permission denied.
>
>Updatedb changes permissions of slocate.db back to -rw-r----- 1 root slocate.
>
>ray@comarre.com said:
>
>
>>If it does, then round up the usual suspects:
>> ls -l /var/lib/slocate/slocate.db
>> ls -l /usr/bin/locate (or wherever Slackware puts it)
>> ldd /usr/bin/locate
>>
>>
>
>ls -l /var/lib/slocate/slocate.db
>-rw-r--r-- 1 root slocate 6640136 2005-04-25 18:08 /var/lib/slocate/slocate.db
>
>ls -l /usr/bin/locate
>lrwxrwxrwx 1 root root 7 2005-03-08 17:45 /usr/bin/locate -> slocate
>
>ldd /usr/bin/slocate
>libc.so.6 => /lib/libc.so.6 (0x4001e000)
>/lib/ld-linux.so.2 (0x80000000)
>
>Fedora:
>ls -l /var/lib/slocate/slocate.db
>-rw-r----- 1 root slocate 2874826 2005-04-20 15:07
>/mnt/rh9root/var/lib/slocate/slocate.db
>
>ls -l /usr/bin/locate
>-rwxr-sr-x 1 root slocate 26460 2004-10-20 /usr/bin/locate -> slocate
>
>ldd /usr/bin/slocate
> libc.so.6 => /lib/tls/libc.so.6 (0x004c7000)
> /lib/ld-linux.so.2 (0x004ae000)
>
>
..../tls/... ?
My Slackware 10.1: ldd /usr/bin/slocate:
libc.so.6 => /lib/libc.so.6 (0x40009000)
/lib/ld-linux.so.2 (0x80000000)
HTH, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs