How to make Android MTP in CentOS7 available for all users?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite












I'm using Moto G4 play with Marshmallow; and CentOS 7. I'm able to mount the device and see the content as root, by using jmtpfs. First time I used sudo then I switched as root and then mounted, works fine on both occasions; but files are only visible for root user. personal user is not able to access the content



[shiva@jayan ~]$ sudo su -
[sudo] password for shiva:
Last login: Wed Dec 6 23:51:54 IST 2017 on pts/0
[root@jayan ~]# jmtpfs /media/phone/
Device 0 (VID=22b8 and PID=2e82) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Android device detected, assigning default bug flags
[root@jayan ~]# ll /media/phone/
total 0
drwxr-xr-x. 38 root root 0 Dec 3 4453203 Internal storage


But when I try to view it as my user, I get permission denied, as a dumb attempt I even tried to change user after mounting.



[shiva@jayan /]$ ll /media/phone 
ls: cannot access /media/phone: Permission denied
[shiva@jayan /]$ cd media/
[shiva@jayan media]$ ll
ls: cannot access phone: Permission denied
total 0
d????????? ? ? ? ? ? phone
[shiva@jayan media]$ sudo chown shiva:shiva phone
[sudo] password for shiva:
chown: changing ownership of ‘phone’: Function not implemented


Then I tried to mount from my user, it detected no mtp :(



[root@jayan ~]# fusermount -u /media/phone
[root@jayan ~]# exit
logout
[shiva@jayan ~]$ jmtpfs /media/phone/
No mtp devices found.


Now my question is how to resolve this?
How to make mtp devices available for my user (or)
How to access files after mounting it as root! I tried using sudo chmod -R 775, it ran forever :'( yet was not able to access those files







share|improve this question






















  • First what group owns that mount when it's mounted? Then you need to realize that there is a udev rule that determine what happens to that mount, so overriding that might do the trick!
    – George Udosen
    Dec 19 '17 at 5:15










  • Please run this cat /etc/group | grep uucp, if that group exists add yourself to it! And see here: wiki.archlinux.org/index.php/MTP
    – George Udosen
    Dec 19 '17 at 5:22







  • 1




    Your question told me that jmtpfs exists, and it turned out it works out just fine with my Android phone - thanks!
    – telcoM
    Dec 21 '17 at 13:32










  • @GeorgeUdosen nope there is no such group, thanks for the input; might help someone with such case :)
    – Shiva
    Dec 21 '17 at 17:54














up vote
4
down vote

favorite












I'm using Moto G4 play with Marshmallow; and CentOS 7. I'm able to mount the device and see the content as root, by using jmtpfs. First time I used sudo then I switched as root and then mounted, works fine on both occasions; but files are only visible for root user. personal user is not able to access the content



[shiva@jayan ~]$ sudo su -
[sudo] password for shiva:
Last login: Wed Dec 6 23:51:54 IST 2017 on pts/0
[root@jayan ~]# jmtpfs /media/phone/
Device 0 (VID=22b8 and PID=2e82) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Android device detected, assigning default bug flags
[root@jayan ~]# ll /media/phone/
total 0
drwxr-xr-x. 38 root root 0 Dec 3 4453203 Internal storage


But when I try to view it as my user, I get permission denied, as a dumb attempt I even tried to change user after mounting.



[shiva@jayan /]$ ll /media/phone 
ls: cannot access /media/phone: Permission denied
[shiva@jayan /]$ cd media/
[shiva@jayan media]$ ll
ls: cannot access phone: Permission denied
total 0
d????????? ? ? ? ? ? phone
[shiva@jayan media]$ sudo chown shiva:shiva phone
[sudo] password for shiva:
chown: changing ownership of ‘phone’: Function not implemented


Then I tried to mount from my user, it detected no mtp :(



[root@jayan ~]# fusermount -u /media/phone
[root@jayan ~]# exit
logout
[shiva@jayan ~]$ jmtpfs /media/phone/
No mtp devices found.


Now my question is how to resolve this?
How to make mtp devices available for my user (or)
How to access files after mounting it as root! I tried using sudo chmod -R 775, it ran forever :'( yet was not able to access those files







share|improve this question






















  • First what group owns that mount when it's mounted? Then you need to realize that there is a udev rule that determine what happens to that mount, so overriding that might do the trick!
    – George Udosen
    Dec 19 '17 at 5:15










  • Please run this cat /etc/group | grep uucp, if that group exists add yourself to it! And see here: wiki.archlinux.org/index.php/MTP
    – George Udosen
    Dec 19 '17 at 5:22







  • 1




    Your question told me that jmtpfs exists, and it turned out it works out just fine with my Android phone - thanks!
    – telcoM
    Dec 21 '17 at 13:32










  • @GeorgeUdosen nope there is no such group, thanks for the input; might help someone with such case :)
    – Shiva
    Dec 21 '17 at 17:54












up vote
4
down vote

favorite









up vote
4
down vote

favorite











I'm using Moto G4 play with Marshmallow; and CentOS 7. I'm able to mount the device and see the content as root, by using jmtpfs. First time I used sudo then I switched as root and then mounted, works fine on both occasions; but files are only visible for root user. personal user is not able to access the content



[shiva@jayan ~]$ sudo su -
[sudo] password for shiva:
Last login: Wed Dec 6 23:51:54 IST 2017 on pts/0
[root@jayan ~]# jmtpfs /media/phone/
Device 0 (VID=22b8 and PID=2e82) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Android device detected, assigning default bug flags
[root@jayan ~]# ll /media/phone/
total 0
drwxr-xr-x. 38 root root 0 Dec 3 4453203 Internal storage


But when I try to view it as my user, I get permission denied, as a dumb attempt I even tried to change user after mounting.



[shiva@jayan /]$ ll /media/phone 
ls: cannot access /media/phone: Permission denied
[shiva@jayan /]$ cd media/
[shiva@jayan media]$ ll
ls: cannot access phone: Permission denied
total 0
d????????? ? ? ? ? ? phone
[shiva@jayan media]$ sudo chown shiva:shiva phone
[sudo] password for shiva:
chown: changing ownership of ‘phone’: Function not implemented


Then I tried to mount from my user, it detected no mtp :(



[root@jayan ~]# fusermount -u /media/phone
[root@jayan ~]# exit
logout
[shiva@jayan ~]$ jmtpfs /media/phone/
No mtp devices found.


Now my question is how to resolve this?
How to make mtp devices available for my user (or)
How to access files after mounting it as root! I tried using sudo chmod -R 775, it ran forever :'( yet was not able to access those files







share|improve this question














I'm using Moto G4 play with Marshmallow; and CentOS 7. I'm able to mount the device and see the content as root, by using jmtpfs. First time I used sudo then I switched as root and then mounted, works fine on both occasions; but files are only visible for root user. personal user is not able to access the content



[shiva@jayan ~]$ sudo su -
[sudo] password for shiva:
Last login: Wed Dec 6 23:51:54 IST 2017 on pts/0
[root@jayan ~]# jmtpfs /media/phone/
Device 0 (VID=22b8 and PID=2e82) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Android device detected, assigning default bug flags
[root@jayan ~]# ll /media/phone/
total 0
drwxr-xr-x. 38 root root 0 Dec 3 4453203 Internal storage


But when I try to view it as my user, I get permission denied, as a dumb attempt I even tried to change user after mounting.



[shiva@jayan /]$ ll /media/phone 
ls: cannot access /media/phone: Permission denied
[shiva@jayan /]$ cd media/
[shiva@jayan media]$ ll
ls: cannot access phone: Permission denied
total 0
d????????? ? ? ? ? ? phone
[shiva@jayan media]$ sudo chown shiva:shiva phone
[sudo] password for shiva:
chown: changing ownership of ‘phone’: Function not implemented


Then I tried to mount from my user, it detected no mtp :(



[root@jayan ~]# fusermount -u /media/phone
[root@jayan ~]# exit
logout
[shiva@jayan ~]$ jmtpfs /media/phone/
No mtp devices found.


Now my question is how to resolve this?
How to make mtp devices available for my user (or)
How to access files after mounting it as root! I tried using sudo chmod -R 775, it ran forever :'( yet was not able to access those files









share|improve this question













share|improve this question




share|improve this question








edited Dec 21 '17 at 18:04









GAD3R

22.6k154894




22.6k154894










asked Dec 6 '17 at 19:41









Shiva

737




737











  • First what group owns that mount when it's mounted? Then you need to realize that there is a udev rule that determine what happens to that mount, so overriding that might do the trick!
    – George Udosen
    Dec 19 '17 at 5:15










  • Please run this cat /etc/group | grep uucp, if that group exists add yourself to it! And see here: wiki.archlinux.org/index.php/MTP
    – George Udosen
    Dec 19 '17 at 5:22







  • 1




    Your question told me that jmtpfs exists, and it turned out it works out just fine with my Android phone - thanks!
    – telcoM
    Dec 21 '17 at 13:32










  • @GeorgeUdosen nope there is no such group, thanks for the input; might help someone with such case :)
    – Shiva
    Dec 21 '17 at 17:54
















  • First what group owns that mount when it's mounted? Then you need to realize that there is a udev rule that determine what happens to that mount, so overriding that might do the trick!
    – George Udosen
    Dec 19 '17 at 5:15










  • Please run this cat /etc/group | grep uucp, if that group exists add yourself to it! And see here: wiki.archlinux.org/index.php/MTP
    – George Udosen
    Dec 19 '17 at 5:22







  • 1




    Your question told me that jmtpfs exists, and it turned out it works out just fine with my Android phone - thanks!
    – telcoM
    Dec 21 '17 at 13:32










  • @GeorgeUdosen nope there is no such group, thanks for the input; might help someone with such case :)
    – Shiva
    Dec 21 '17 at 17:54















First what group owns that mount when it's mounted? Then you need to realize that there is a udev rule that determine what happens to that mount, so overriding that might do the trick!
– George Udosen
Dec 19 '17 at 5:15




First what group owns that mount when it's mounted? Then you need to realize that there is a udev rule that determine what happens to that mount, so overriding that might do the trick!
– George Udosen
Dec 19 '17 at 5:15












Please run this cat /etc/group | grep uucp, if that group exists add yourself to it! And see here: wiki.archlinux.org/index.php/MTP
– George Udosen
Dec 19 '17 at 5:22





Please run this cat /etc/group | grep uucp, if that group exists add yourself to it! And see here: wiki.archlinux.org/index.php/MTP
– George Udosen
Dec 19 '17 at 5:22





1




1




Your question told me that jmtpfs exists, and it turned out it works out just fine with my Android phone - thanks!
– telcoM
Dec 21 '17 at 13:32




Your question told me that jmtpfs exists, and it turned out it works out just fine with my Android phone - thanks!
– telcoM
Dec 21 '17 at 13:32












@GeorgeUdosen nope there is no such group, thanks for the input; might help someone with such case :)
– Shiva
Dec 21 '17 at 17:54




@GeorgeUdosen nope there is no such group, thanks for the input; might help someone with such case :)
– Shiva
Dec 21 '17 at 17:54










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted
+50










Un-comment the user_allow_other on your /etc/fuse.conf file.



Mount your android device with allow_other option on your home directory without sudo :



$ mkdir phone
$ jmtpfs -o allow_other phone/





share|improve this answer




















  • Thanks for the answer, not in a position to check and certify the answer. But I felt compelled to thank, and so here it is :) give me 6 hours
    – Shiva
    Dec 21 '17 at 11:56






  • 1




    Thanks!! Works like magic. Didn't do any hard core file transfer testing - sort of one mkdir, delete tmp file and open a video. Hope that covered all normal file operations ;)
    – Shiva
    Dec 21 '17 at 17:58










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409288%2fhow-to-make-android-mtp-in-centos7-available-for-all-users%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote



accepted
+50










Un-comment the user_allow_other on your /etc/fuse.conf file.



Mount your android device with allow_other option on your home directory without sudo :



$ mkdir phone
$ jmtpfs -o allow_other phone/





share|improve this answer




















  • Thanks for the answer, not in a position to check and certify the answer. But I felt compelled to thank, and so here it is :) give me 6 hours
    – Shiva
    Dec 21 '17 at 11:56






  • 1




    Thanks!! Works like magic. Didn't do any hard core file transfer testing - sort of one mkdir, delete tmp file and open a video. Hope that covered all normal file operations ;)
    – Shiva
    Dec 21 '17 at 17:58














up vote
2
down vote



accepted
+50










Un-comment the user_allow_other on your /etc/fuse.conf file.



Mount your android device with allow_other option on your home directory without sudo :



$ mkdir phone
$ jmtpfs -o allow_other phone/





share|improve this answer




















  • Thanks for the answer, not in a position to check and certify the answer. But I felt compelled to thank, and so here it is :) give me 6 hours
    – Shiva
    Dec 21 '17 at 11:56






  • 1




    Thanks!! Works like magic. Didn't do any hard core file transfer testing - sort of one mkdir, delete tmp file and open a video. Hope that covered all normal file operations ;)
    – Shiva
    Dec 21 '17 at 17:58












up vote
2
down vote



accepted
+50







up vote
2
down vote



accepted
+50




+50




Un-comment the user_allow_other on your /etc/fuse.conf file.



Mount your android device with allow_other option on your home directory without sudo :



$ mkdir phone
$ jmtpfs -o allow_other phone/





share|improve this answer












Un-comment the user_allow_other on your /etc/fuse.conf file.



Mount your android device with allow_other option on your home directory without sudo :



$ mkdir phone
$ jmtpfs -o allow_other phone/






share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 19 '17 at 11:46









GAD3R

22.6k154894




22.6k154894











  • Thanks for the answer, not in a position to check and certify the answer. But I felt compelled to thank, and so here it is :) give me 6 hours
    – Shiva
    Dec 21 '17 at 11:56






  • 1




    Thanks!! Works like magic. Didn't do any hard core file transfer testing - sort of one mkdir, delete tmp file and open a video. Hope that covered all normal file operations ;)
    – Shiva
    Dec 21 '17 at 17:58
















  • Thanks for the answer, not in a position to check and certify the answer. But I felt compelled to thank, and so here it is :) give me 6 hours
    – Shiva
    Dec 21 '17 at 11:56






  • 1




    Thanks!! Works like magic. Didn't do any hard core file transfer testing - sort of one mkdir, delete tmp file and open a video. Hope that covered all normal file operations ;)
    – Shiva
    Dec 21 '17 at 17:58















Thanks for the answer, not in a position to check and certify the answer. But I felt compelled to thank, and so here it is :) give me 6 hours
– Shiva
Dec 21 '17 at 11:56




Thanks for the answer, not in a position to check and certify the answer. But I felt compelled to thank, and so here it is :) give me 6 hours
– Shiva
Dec 21 '17 at 11:56




1




1




Thanks!! Works like magic. Didn't do any hard core file transfer testing - sort of one mkdir, delete tmp file and open a video. Hope that covered all normal file operations ;)
– Shiva
Dec 21 '17 at 17:58




Thanks!! Works like magic. Didn't do any hard core file transfer testing - sort of one mkdir, delete tmp file and open a video. Hope that covered all normal file operations ;)
– Shiva
Dec 21 '17 at 17:58

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409288%2fhow-to-make-android-mtp-in-centos7-available-for-all-users%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay