简体   繁体   中英

Why does gammu require sudo to work?

Sorry if the answer is obvious for you. Linux is rather new for me, and to learn I want to understand how things stick together.

For me it's irritating that gammu requires administrative rights just to communicate to a USB-device. On the other hand eg on the raspberry pi you can access the GPIO-pins without the sudo command. So I don't understand the logic behind that.

Is there some logic, when sudo is required and when not or is this random? Thanks!

You just need permissions on device you're using. Generally this can be achieved either by adding user to some group (depends on the device and Linux distributions, but plugdev or dialout might be good choices) or adding udev rule to grant access to given device.

This is quite deeply covered by Gammu documentation:

http://wammu.eu/docs/manual/config/index.html#option-Device

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM