Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I want to remount a read-only partition in read-write mode, but I want it to be writable for all users.

So far I've got this:

mount -o bind /someplace /someplace_else
mount -o remount rw /someplace_else

The first command creates a new mount point from a directory. The second one remounts the new mount point as rewritable. This all works.

Problem is, the new mount point has uid=1000,fmask=0222,dmask=0222, so the non-root user still can't write anything, and root can't give it permission.

How do I change the fmask and uid when remounting, or is there something else I can do to make the mount writable for the normal user?

Also, note that the command that worked for me is this:

mount -o remount rw /someplace_else

...with no comma between "remount" and "rw," as I've seen in almost everything my searches turned up. Does anyone know anything about this discrepancy in syntax?

Update

Ok, I guess had a strange version of mount. Now I'm using busybox mount, and I can do this:

busybox mount -o remount,rw /someplace_else

It accepts this version of the command, but the masks don't change:

busybox mount -o remount,rw,fmask=0000,dmask=0000 /someplace_else

Storage is vfat, maybe that has something to do with it?

suid and dev options also work, but the fmask and dmask won't change (I want them 000, that should leave files with 777).

share|improve this question
    
I don't know whether this qualifies as a dev question or not, I guess it's a bit technical. Mods, if you think this is in the wrong place, feel free to migrate it elsewhere in SE. –  Janitor Jun 11 '12 at 18:27
    
fmask and dmask would be passed to the mount. it would look something like: mount -o fmask=0777,dmask=0777 remount rw /someplace_else –  Ryan Conrad Jun 11 '12 at 19:47
    
@RyanConrad, I know, but it's not working. I had some weird version of mount. Making an update. –  Janitor Jun 11 '12 at 19:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.