Re: /dev/ttyS0 - Permission denied.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 30 March 2005 16:18, Alexander Dalloz wrote:
> Am Do, den 31.03.2005 schrieb kamarudin samsudin um 0:08:
> > I need to run python script that read/write to serial port
> > (/dev/ttyS0). As root, i can run the script without problem but when i
> > tried to involke it via browser ( apache2. PHP 4.3) i got error. The
> > error is
> >    /dev/ttyS0 - Permission denied.
> >
> > i tried chmod go+wr /dev/ttyS0...but it not working. Please help me.
> >
> > BTW - im using Core 3 on i386, pySerial python module and apache2.
> >
> > kamarudin samsudin
>
> Any chance SELinux is interfering? Please check your syslog file
> /var/log/messages for avc / audit messages when you try to access the
> serial device through Apache.
>
> Alexander

sounds like this could be a udev issue.  Check out this link:
http://www.reactivated.net/udevrules.php

or maybe setup a perms file like the one needed for a palm device (see the 
post text from a palm issue below).


[snip]
> I have a new Handspring Treo and I'm running FC3. The device
> /dev/ttyUSB1 only appears when the unit is trying to sync and it appears
> new each time with only user readable perms (600 ?) . So the only way to
> sync is to change perms to 666 on /dev/ttyUSB1 each time I sync while
> the device is there.
>
> Any way to make the device permanent?

Kevin,

Try creating a file called /etc/udev/rules.d/10-visor.rules with this content:

BUS="usb", SYSFS{product}="Palm Handheld*", KERNEL="ttyUSB*", SYMLINK="pilot"

Seemed to do the trick for me.  If it doesn't work, you can also try adding a 
file called /etc/udev/permissions.d/10-visor.permissions with this content:

ttyUSB1:$local:uucp:0660

For more info, look at this site:

http://www.clasohm.com/blog/one-entry?entry_id=12096

which is where I found the solution that worked for me.

Hope that helps.
[snip]


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux