So I'm pretty new to servers; I've been running websites off of 3rd party hosts, but I thought I might like to try it on my own for once. I got a Raspberry Pi running Raspian Wheezy, and I successfully installed Apache2.

When I tested Apache for the first time before modifying any settings, it returned the "Everything is working fine!" message. However, I have an external USB drive that I wanted my webroot to reside on. I went into the file /etc/apache2/sites-enabled/000-default, and changed the DocumentRoot and Directory from /var/www/ to the following address that specifies a folder I made in my mounted device.

    DocumentRoot /media/888F-2455/www/
    <Directory /media/888F-2455/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all

When I tried to load my localhost again, I was met with a 403 forbidden error. After doing some looking around, it seemed that taking ownership of the folder would solve this problem. I tried inputting sudo chown -R www-data:www-data /media/888F-2455/www into my root terminal, but I was told

chown: changing ownership of `/media/888F-2455/www/index.html': Operation not permitted

Which I can't understand since I'm a root user using the root terminal.

What is going on here and how can I fix it? Please answer like you're talking to an 8 year old because I'm not very adept at linux or apache at this point in time.

  • You shouldn't give a webserver write access. Just make the files in question readable by the webserver using something like chmod -R a+r /media/888F-2455/www
    – Gerben
    Feb 7, 2014 at 14:00

1 Answer 1


This message usually indicates the filesystem is in read only mode or not fully supported.

Please check the following:

  • which filesystem is the external drive formated with? (mount| grep media)
  • is the drive mounted rw (same as above)

If the external drive is formated with fat/fat32/ntfs this is your problem.

If not then unmount the drive (do not unplug it), run a filesystem check and mount again explicitly specifying rw (mount -o noatime,rw /dev/... /media/..)

  • i figured this out last night, it was the filesystem. after i reformatted to ext4 it was all good Feb 7, 2014 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.