Hi suse experts, Since upgrading to 6.3, I get a "/dev/cua1: Device or resource busy" error when trying to use rz from within kermit to download files. The command, implimented as a macro in kermit is: rz /dev/modem and has been working fine for years. The first time I tried a download after the SuSE upgrade I got "/dev/cua1: permission denied" as I had forgotten to give world rw permission on this device. After setting its mode to 666, I now get the busy error. I suspect there may be a stale lock left after the initial attempt, but that's just a guess. In any case, I can't find any lock to remove, searching /proc/locks and /var/lock. In /var/lock is the LCK..modem file, but no other; removing that file doesn't free up /dev/cua1. /dev/modem is a symlink to /dev/ttyS1. Quitting and restarting kermit doesn't help either. I seem to recall reading odds and ends of changes in the serial-port structure in recent kernels, but, just-my-luck, I can't seem to find any of those refs now. I don't see anything applicable in the 6.3 manual. FWIW, here's the /proc/locks file (it's short); can anyone see something related to /dev/cua1 in here, and if so, how to I remove that lock? ----------------/proc/locks:-------------------------- 1: FLOCK ADVISORY WRITE 0 08:01:208082 0 2147483647 c2977c80 00000000 c2977da0 00000000 00000000 2: FLOCK ADVISORY WRITE 0 08:01:146955 0 2147483647 c2977da0 c2977c80 c2977c20 00000000 00000000 3: POSIX ADVISORY WRITE 2095 08:01:146929 0 2147483647 c2977c20 c2977da0 00000000 00000000 00000000 ---------------end /proc/locks----------------------- Is there some other place I should be looking for resource locks? TIA, jimo@eskimo.com -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On 10-May-2000 Jim Osborn wrote:
Hi suse experts,
Since upgrading to 6.3, I get a "/dev/cua1: Device or resource busy" error when trying to use rz from within kermit to download files. The command, implimented as a macro in kermit is:
rz /dev/modem
and has been working fine for years. The first time I tried a download after the SuSE upgrade I got "/dev/cua1: permission denied" as I had forgotten to give world rw permission on this device. After setting its mode to 666, I now get the busy error. I suspect there may be a stale lock left after the initial attempt, but that's just a guess. In any case, I can't find any lock to remove, searching /proc/locks and /var/lock. In /var/lock is the LCK..modem file, but no other; removing that file doesn't free up /dev/cua1. /dev/modem is a symlink to /dev/ttyS1. Quitting and restarting kermit doesn't help either.
I seem to recall reading odds and ends of changes in the serial-port structure in recent kernels, but, just-my-luck, I can't seem to find any of those refs now. I don't see anything applicable in the 6.3 manual.
FWIW, here's the /proc/locks file (it's short); can anyone see something related to /dev/cua1 in here, and if so, how to I remove that lock?
----------------/proc/locks:-------------------------- 1: FLOCK ADVISORY WRITE 0 08:01:208082 0 2147483647 c2977c80 00000000 c2977da0 00000000 00000000 2: FLOCK ADVISORY WRITE 0 08:01:146955 0 2147483647 c2977da0 c2977c80 c2977c20 00000000 00000000 3: POSIX ADVISORY WRITE 2095 08:01:146929 0 2147483647 c2977c20 c2977da0 00000000 00000000 00000000 ---------------end /proc/locks-----------------------
Is there some other place I should be looking for resource locks?
TIA,
jimo@eskimo.com
Hi Jim, What version of kermit are you using? I'm using Version 7.0.196 without any problems at work. The configuration file for rzsz is in ckurzsz.ini and does not look anything like what you have mentioned above. I will have to check with the set-up at work to get my settings which will be tomorrow. As far as I know /dev/cua devices are now obsolite and are replaced by /dev/ttyS devices. In the mean time have a look at ckubwr.txt under the heading linux for more info on serial ports. This is an extract of what is in my version of this document ---------------------------------------------------------- "set line /dev/cua0" reports "Device is busy", but "set line /dev/ttyS0" works OK. In short: If the cua device doesn't work, try the corresponding ttyS device. If the ttyS device doesn't work, try the corresponding cua device -- but note that Linux developers do not recommend this, and are phasing out the cua devices. From /usr/doc/faq/howto/Serial-HOWTO: ------------------------------------------------------ Note that the cua device is now "deprecated", and new editions of Linux will phase it out in favor of the ttyS device. See: http://linuxwww.db.erau.edu/mail_archives/linux-kernel/Mar_98/1441.html -------------------------------------------------------- The other problem I ran into was setting up the permissions correctly under a normal user as you mention above. The proper procedures are covered in ckuins.txt towards the end of the file. Extract of this doc --------------------------------------------------------------- a. Have the superuser change the permission of the lockfile directory and to the tty devices so that everyone on the system has read/write permission. su% chmod 777 /usr/spool/locks (or whatever the path is) su% chmod 666 /dev/ttyXX One risk here is that people can write lots of junk into the lockfile directory, delete other people's files in the lockfile directory, and intercept other people's data as it goes in and out of the tty device. The major danger here would be intercepting a privileged password. Of course, any user could write a short, ordinary, unprivileged program to do exactly the same thing if the tty device was world read/writeable. The other risk as that telephone calls are not controlled -- anybody on your system can make them, without having to belong to any particular group, and this could run up your phone bill. b. Have the superuser change Kermit to run setuid and/or setgid to the owner and/or group of the lockfile directory and the tty devices if necessary), typically uucp (see next section), but NOT root. Example: su% chown uucp kermit - or - chgrp uucp kermit su% chmod u+s kermit (setuid) - or - chmod g+s kermit (setgid) and then make sure the lockfile directory, and the tty devices, have owner (setuid) and/or group (setgid) write permission. For example: su% chmod o+rwx /usr/spool/uucp su% chown uucp /dev/ttyXX ; chmod 600 /dev/ttyXX In some cases, the owner and group must be distinct; the key point is that read/write access is required to both the UUCP lockfile directory and the tty itself. ---------------------------------------------------- Hope this helps. Regards, Graham Smith ---------------------------------- -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (2)
-
gqs@zip.com.au
-
jimo@eskimo.com