LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-01-2007, 06:02 PM   #1
clem_g
LQ Newbie
 
Registered: Jun 2007
Posts: 2

Rep: Reputation: 0
/dev/ttyS0 permission failure in user


Gtkterm uses the serial port /dev/ttyS0 ( COM1 in DOS / Windows ), I am only able to use this in ROOT. When loged on as user - fails to open /dev/ttyS0.

I have used the command:
sudo chmod a+w+r /dev/ttyS0 from ROOT and then it works, however when I reboot the machine I have to do this again.

Q - How can I permanently set the permission so that I do not have to run this command from ROOT every time I reboot?

I am using Fedora Core 5.

Sorry I am new to Linux and this forum
Clem.
 
Old 06-01-2007, 07:16 PM   #2
ScottSmith
LQ Newbie
 
Registered: Mar 2004
Distribution: Debian - Sid
Posts: 23

Rep: Reputation: 1
I am using Debian and if I add myself to the 'dialout' group I get the permission to use the device. I am not sure if this true for Red Hat, but worth a try. It might even be a different group; you can check what group uses /dev/ttyS? by typing in a terminal window ll /dev/ttyS?.
 
Old 06-02-2007, 01:21 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Check the group for /dev/ttyS0 (as said) and make yourself a member of that group. I seem to remember that the group is uucp
 
Old 06-03-2007, 05:40 PM   #4
clem_g
LQ Newbie
 
Registered: Jun 2007
Posts: 2

Original Poster
Rep: Reputation: 0
How do I make myself a member of the group uucp?

do I edit the file /etc/group and add a line to it?

This group file contains the following lines amongst many other lines

uucp:x:14:uucp
clem:x:500:

my user name is clem

can you advise me what I should put in this file?
 
Old 06-04-2007, 12:27 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Use usermod with the -G option. Read the man page. You can use a graphical tool if X is running on your system (at least, older RHs had that functionality).
 
Old 06-04-2007, 03:21 PM   #6
ScottSmith
LQ Newbie
 
Registered: Mar 2004
Distribution: Debian - Sid
Posts: 23

Rep: Reputation: 1
You can type adduser clem uucp into a terminal window; that should get you the permissions that you need.
 
Old 06-04-2007, 05:02 PM   #7
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
you can also edit the /etc/group file and change the uucp entry to:

uucp:x:14:uucp,clem
 
Old 06-05-2007, 01:22 AM   #8
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by ScottSmith
You can type adduser clem uucp into a terminal window; that should get you the permissions that you need.
adduser creates a new account by asking questions, or am I mistaken and can it be used to nodify it as well?
 
Old 06-05-2007, 02:03 AM   #9
ScottSmith
LQ Newbie
 
Registered: Mar 2004
Distribution: Debian - Sid
Posts: 23

Rep: Reputation: 1
If used as adduser <username> it will create a new user and asking questions about the user. However, if used as adduser <username> <group> will add <username> to the specified <group>.

Conversely you can use deluser <username> to remove/delete a user from the system. Also deluser <username> <group> to remove a user from a group.

Last edited by ScottSmith; 06-05-2007 at 02:08 AM.
 
Old 06-05-2007, 02:30 AM   #10
jaepi
Member
 
Registered: Apr 2007
Location: Urban Jungle
Distribution: Ubuntu
Posts: 189
Blog Entries: 1

Rep: Reputation: 30
chmod 777 dev/ttyS0
 
Old 06-05-2007, 05:23 AM   #11
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
That's not the way as it opens it up for the whole world and, as stated in the opening post, it is no longer there after a reboot.
 
Old 06-05-2007, 06:04 AM   #12
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Rep: Reputation: 39
you could if you wanted to change the permissions set it to do so in /etc/rc.d/local.rc, and put your command in there on a new line it will be run as root anyway. Your probably better off however setting your user as part of the group, better security
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
alsa/esd not starting as local user,errs-/dev/dsp no permission deepclutch Debian 1 02-03-2007 09:00 PM
/dev/cdrom user permission problems! soupnazi.tar.gz Slackware 4 01-27-2006 04:07 AM
User access permission to /dev/sg* shreks Fedora 1 01-16-2006 05:54 AM
ssh login with normal user, receive: /dev/null: Permission denied mark78301 Red Hat 3 11-12-2005 09:20 AM
user permission issues with /dev/ (sound and cdrom) ngan_yine Slackware 3 11-03-2004 05:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration