MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi. I'm using Mandrake 10.0. I have a script that needs to talk to /dev/ttyS1. The default permission of ttyS1 seems to be 660.
I can 'su' then 'chmod 666 /dev/ttyS1'. This is fine, but when the machine reboots (or, it seems, I log on the the graphical session), the permission is re-set to 660 - and my script fails to access the port.
Does anyone know what setting I need to change to have the default permission of ttyS1 as user-read/writable?
Not all that familiar with Mandrake but I assume it uses udev so there's nothing fixed about dev. You could try modifying your udev perms. Better, maybe adding yourself to the tty group (or whatever group owns the device) would work.
@gilester: Normally devices like some tty's, disks, audio and floppy are owned by the logged in user. This is done
by "session optional pam_console.so" in /etc/pam.d/login or /etc/pam.d/*dm. Make sure you have that entry.
That should also touch a file named as your login in /var/run/console/.
Thanks for the reply. I do have the line "session optional pam_console.so" in /etc/pam.d/login, however I do not have anything in /var/run/console. I'm afraid I didn't quite understand what you meant with the touch part. Do I just type "touch /var/run/console/<username>"?
Hmm, my file has "ttyS*:root:uucp:0660" but when I 'ls -la /dev/ttyS1' it's "crw-rw---- 1 peder uucp 4, 65 feb 6 21:08 /dev/ttyS1"
AFAI can see something changed it from root to peder and I know from experimenting with ldap that if you miss
the console.so in pam.d you can't acces a lot of /dev entries you normally can.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.