Results 1 to 8 of 8

Thread: openSUSE 11.3 minicom permission denied with usb serial adapter

  1. #1

    Default openSUSE 11.3 minicom permission denied with usb serial adapter

    Hi,

    I have a usb serial adapter and was happily using minicom with it under openSUSE 11.2. I've upgraded to openSUSE 11.3 and I can only use minicom with this serial adapter as root. I had previously had problems writing to /var/lock under openSUSE 11.2 which I worked around by changing the minicom config to use /tmp as its lock file location.

    Unfortunately my laptop doesn't have a built in serial port so I can't tell if its a general problem or something specific to the /dev/ttyUSB0 device.

    This is the output I get when I run minicom with my regular user account. I get the same output whether the lock file location is set to /tmp or /var/lock

    Code:
    ~> minicom usb0                                      
    Device /dev/ttyUSB0 lock failed: Permission denied.
    Before I started tinkering my user belonged to the following groups
    Code:
    groups=16(dialout),33(video),100(users)
    I've since added 5(tty),14(uucp),21(console) but still no joy.

    Can anyone shed some light on this or point me in the right direction.

    Thanks.

  2. #2
    Join Date
    Aug 2009
    Location
    Mountain View, CA
    Posts
    204

    Default Re: openSUSE 11.3 minicom permission denied with usb serial adapter

    Just saw this: https://bugzilla.novell.com/show_bug.cgi?id=552095

    I do not know what they mean by lockdev support....

  3. #3

    Default Re: openSUSE 11.3 minicom permission denied with usb serial adapter

    I also know very little about lockdev but I do have it installed

    Code:
    ~> zypper search lockdev
    Loading repository data...
    Reading installed packages...
    
    S | Name          | Summary                                  | Type   
    --+---------------+------------------------------------------+--------
    i | liblockdev1   | The header files for the lockdev library | package
    i | lockdev       | A library for locking devices            | package
      | lockdev-devel | A library for locking devices            | package
    I also have the latest version of minicom installed
    Code:
    Repository: @System
    Name: minicom
    Version: 2.3-37.2
    Arch: i586
    Vendor: openSUSE
    Installed: Yes
    Status: up-to-date
    Installed Size: 701.0 KiB

  4. #4
    Join Date
    Jun 2008
    Location
    Bellaria Igea Marina
    Posts
    24

    Default Re: openSUSE 11.3 minicom permission denied with usb serial adapter

    I have done so:
    Code:
    minicom -s
    and I did setup "Serial Port Setup"

    A- Serial device : /dev/ttyUSB0

    and saved as default.

    I added my user to the group dialout and then I rebooted my openSUSE 11.3.

    Code:
    myuser@mysuse:~> minicom
     
    Welcome to minicom 2.3                                                                                                                                           
                                                                                                                                                                     
    OPTIONS: I18n                                                                                                                                                    
    Compiled on Jul  5 2010, 13:45:50.                                                                                                                               
    Port /dev/ttyUSB0                                                                                                                                                
                                                                                                                                                                     
                     Press CTRL-A Z for help on special keys
    I hope it help. :-)

  5. #5

    Default Re: openSUSE 11.3 minicom permission denied with usb serial adapter

    I was fairly sure I was a member of all the right groups but I restarted anyway, same issue.

    I think I've got a solution now but I'm not 100% sure if its correct or what the correct solution should be. Earlier I mentioned that I had a problem with openSUSE 11.2 I mentioned I worked around not being able to write to /var/lock by configuring minicom to use /tmp. I think the lockdev integration in openSUSE 11.3 causes that setting to be ignored and lockdev or minicom always tires to create a file in /var/lock. In my system the permissions are set as follows
    Code:
    :~> ls -l /var/ | grep lock                                 
    drwxrwxr-t   6 root root 4096 2010-07-21 16:18 lock
    If I change the permissions such that /var/lock is writable by all then I can use minicom with a non-root user. According to this setting /var/lock to be world writable has security implications so I'm wondering what the proper fix is.

  6. #6

    Default Re: openSUSE 11.3 minicom permission denied with usb serial adapter

    Answering my own question. After comparing notes with a friends fresh openSUSE 11.3 install the fix is
    Code:
    sudo chgrp lock /var/lock

  7. #7
    Join Date
    Aug 2009
    Location
    Mountain View, CA
    Posts
    204

    Default Re: openSUSE 11.3 minicom permission denied with usb serial adapter

    Yes /var/lock by default is owned by the group lock.... But how did that fix the problem if it was the default permissions for /var/lock anyways ?

  8. #8

    Default Re: openSUSE 11.3 minicom permission denied with usb serial adapter

    Because it wasn't the default in openSUSE 11.2. In 11.2 /var/lock had the group set to "root". I upgraded (instead of a fresh install) so I guess the update leaves file permissions alone whereas a fresh install would have created the directory with the group set to "lock".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •