Neal Lippman <[EMAIL PROTECTED]> writes:
> I had originally thought, perhaps naively, that the way that file
> permissions worked is that if you are not the owner of a file, then
> if you had access to the group of the file you could access it via
> the group permissions, but it seems via my testing that only the
> current group (eg the EGID) seems to be looked at, not whatever
> groups you are allowed to change to via /etc/groups.

No, your original thought was correct.  You can verify what groups
you're in by using the 'id' command:

    $ id
    uid=501(bryan) gid=501(bryan) groups=501(bryan),61(smb),405(sysadm)

Note that this list gets built when you log in, so you'll need to log
out and in again to have the new groups listed.  That might be what
bit you.

> The only solution that comes to mind so far is to create a shell script to 
> "wrapper" JPilot:
>         #! /bin/sh
>         newgrp visor
>         kpilot
>         newgrp
>
> and change the link in KDE's menus to point to this script instead
> of directly to the kpilot program.

No, that's definitely not going to work, at least not that way.  The
newgrp command gives you a *new shell* that had the gid you
specified.  To make that work it would have to be something like:

    #!/usr/bin/newgrp visor
    kpilot

But you don't want to do that anyway.  Go back to what you were doing
to begin with - it sounded like you were on the right track.

# chgrp visor /dev/ttyUSB1
# chmod g+rw /dev/ttyUSB1
put yourself in group visor
logout
log in again

*OR*, better yet, figure out how to get the device chowned to belong
to you when you log in and returned when you log out again.

{Bryan}
-- 
Bryan Howard <[EMAIL PROTECTED]>

Reply via email to