[ltp] tpctl & thinkpad 3.0pre1
Thomas Hood
linux-thinkpad@www.bm-soft.com
Mon, 15 Oct 2001 01:16:14 +0100 (BST)
--- Tino Keitel <tino.keitel@web.de> wrote:
> I have this problem:
>
> > root < @thinkpad:/root$ ll -d /dev/thinkpad/
> drw-rw-rw- 1 root adm 0 Oct 10 19:58 /dev/thinkpad/
>
> As you can see, no x permissions, so tpctl will only work as root since an
> ordinary user is not allowed to look into /dev/thinkpad. The files inside
> /dev/thinkpad have the right permissions:
>
> > root < @thinkpad:/root$ ll /dev/thinkpad/
> total 0
> drw-rw-rw- 1 root adm 0 Oct 10 19:58 .
> drwxr-xr-x 1 root root 0 Jan 1 1970 ..
> crw-rw-r-- 1 root thinkpad 8, 2 Jan 1 1970 rtcmosram
> crw-rw-r-- 1 root thinkpad 8, 1 Jan 1 1970 smapi
> crw-rw-r-- 1 root thinkpad 10, 170 Jan 1 1970 thinkpad
>
> What did I wrong?
I'm not sure. Perhaps root's umask is set to something
other than 022?
> Or should I tweak the 'mode' argument of devfs_mkdir?
devfs_mk_dir does not take a "mode" argument. However,
devfs_mk_dir always creates a directory with rx permission
for all, so I suspect that something is wrong with your
devfsd configuration.
A workaround is simply to do
chown root.thinkpad /dev/thinkpad
chmod ug+x /dev/thinkpad
on the directory after it has been created.
A more permanent workaround is to add these lines to
devfsd.conf (or in Debian, create the file /etc/devfs/conf.d/thinkpad
with these lines) and restart devfsd, unload and reload
the thinkpad modules:
REGISTER thinkpad$ PERMISSIONS root.thinkpad 0664
REGISTER thinkpad$ EXECUTE chmod 0755 /dev/thinkpad
However, you really should find out why the directory perms
are being set to 0666.
--
Thomas
=====
Linux on ThinkPad 600 page: http://panopticon.csustan.edu/thood/tp600lnx.htm
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html