phatina / simple-mtpfs

Simple MTP fuse filesystem driver.
GNU General Public License v2.0
371 stars 45 forks source link

Can't delete actual files on MTP device. #51

Open jBachalo opened 7 years ago

jBachalo commented 7 years ago

Hi Perhaps this is a limitation of this approach. Please see my long thread and attempt to delete files http://www.linuxquestions.org/questions/linux-software-2/simple-mtpfs-unable-to-delete-files-%5Bpermissions-issue%5D-4175596482/

I had 90% of a solution Looking at the various FUSE options I saw that there is allow_root I also discovered that FUSE options are set when you mount the device

$ simple-mtpfs ~/camera -o allow_root However, i at first got an error with the above and first had to edit my /etc/fuse.conf and uncomment 'user_allow_other'

So then

$ simple-mtpfs ~/camera -o allow_root
$ ##chmod not necessary, we are already accessing camera as root 
$ sudo rm -rf ~/camera/DCIM/Camera/*

To confirm unmounted, remounted and checked mounted Camera directory. All photos seemed to be gone!

$ fusermount -u ~/camera
$ simple-mtpfs ~/camera -o allow_root

However, the original photos on the actual physical camera are NOT deleted even though they seem to be when I remount the camera.