Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm new un the world of GNU/Linux and I have a problem which I think is caused by the permissions which are not correct. I'm running Ubuntu 11.10 with chroot running under Android 4.4.2 (I don't know if this expression is correct). When I mounted it I binded the Android directory (where I have my PHP projects) "/sdcard" to the Linux directory "/media/sdcard". Then I created a folder called "media" in "/var/www" and another folder within it called "sdcard". When I access it with Apache everything is correct (it shows me an empty index of files) and the permissions are: drwxrwxr-x. 2 root www-data 4096 Apr 18 10:24 sdcard Then I added a line in "/etc/fstab" which binds "/media/sdcard" with "/var/www/media/sdcard":

/media/sdcard /var/www/media/sdcard auto bind

But it didn't worked. I rebooted Ubuntu and Android but it's still not mounted. I tried to change "auto bind" with "none bind 0 0" but still doesn't work, "/var/www/media/sdcard" appears to be empty.

Finally, I tried using "sudo mount --bind /media/sdcard /var/www/media/sdcard" which worked for me. But now the folder "/var/www/media/sdcard" has as permissions: drwxrwx--x. 31 root 1028 4096 Apr 16 5:52 And now Apache throws me a 403 Forbidden error instead of the previous empty list.

Is it caused by the permissions? If that's true, how can I "restore" them? I tried with "sudo chmod -vR 0775 /var/www/media/sdcard" but it doesn't work, and changing the ownership with "sudo chown -vR www-data /var/www/media/sdcard" doesn't change anything.

Sorry for my English, I'm from Spain.

share|improve this question
Welcome to Ask Ubuntu! New questions about end-of-life Ubuntu releases are considered off-topic as per the help center. These old releases are unsupported and their use is not recommended. They don't even get updates for newly discovered security vulnerabilities, which makes using them risky. If you install or upgrade to a supported release and this question still applies, please flag and/or comment to request it be reopened. –  Dan Apr 19 '14 at 10:25

Your Answer


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

Browse other questions tagged or ask your own question.