In my project I've connected a Raspberry Pi 2 and Arduino by serial USB. I would switch on some leds, by a php interface.

So, the PHP interface is ok, but when I chose the led to put on, nothing happens. The serial wired is ok because I can switch on the leds by using the IDE tool on the RPi 2.

The help PHP page is correctly reached.

After a lot of research, I think that the problem could be the permission settings. The php web interface, could use /dev/ttyACM0 port, but maybe, it doesn't happens.

Considering the possible users like, www-data (Apache2), root and pi, after having seen some guides online, I'm confused. I can't understand wich user has to be enable in orther to use /dev/ttyACM0 port.

In conclusion, I attach the command used:

sudo chmod 777 /dev/ttyACM0
sudo usermod -a -G dialout www-data
sudo chown -R www-data:www-data /directory

1 Answer 1


I solved ! ! ! It was not a permissions problem, but a problem with the php code. version of Debian that I used "Jessie" version seems to have some problems with php, so I replaced it with the "wheezy" version now everything works. But we must always activate "minicom", but just do it start on boot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.