I have LAMP running in Ubuntu.

However, my files are located on a separate NTFS hard drive (/media/shared/mysite/).

going to http://localhost gives me a 403

how can i, securely, allow apache to read/write the NTFS disk?

'shared' is currently being mounted when system boots. here's the entry in fstab:

/dev/sda1       /media/shared    ntfs-3g    quiet,defaults,locale=en_US.utf8,umask=000     0      0
link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

What are the permissions of the files there? Try a ls -l /media/shared

link|improve this answer
drwxrwxrwx 1 root root 0 2009-11-04 22:02 websites – lyrae May 13 '10 at 15:08
Check if the share is mounted RO or RW #mount If it's RW, make: # su - www-data # cd /media/shared # touch test.test # ls -l test* and see what's happen – Pier May 13 '10 at 16:45
RW. doing what you say, shows everything is owned by root. for example, here's a line from the output: "-rwxrwxrwx 1 root root 85 2009-06-30 06:19 del.php" – lyrae May 14 '10 at 5:03
So you can create any file you want with www-data user in that dir? If yes...what apache logs say? – Pier May 14 '10 at 8:43
127.0.0.1 - - [14/May/2010:12:45:41 -0400] "GET / HTTP/1.1" 403 496 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.9 Safari/533.2" – lyrae May 14 '10 at 16:46
show 3 more comments
feedback

Your Answer

 
or
required, but never shown

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