You do not have permission to access this ubuntu 14.04 server

Agenda: To have a shared project folder between Linux and Windows

I changed my document root from: /var/www/htmlto /media/mithun/Projects/teston my ubuntu 14.04 computer

I get an error like:

Forbidden

You do not have permission to access this server.

Apache / 2.4.7 (Ubuntu) Server on the local host Port 80

So, I added a few scripts: sudo gedit /etc/apache2/sites-available/000-default.conf

# DocumentRoot /var/www/html
  DocumentRoot /media/mithun/Projects/test

But it Document Root /var/www/testworks, but not with Windows NTFS Partition Manager .

Even after linking to:

Without success :( So kindly help me with this ...

. - ( : Windows: E:/Drive)

@Lmwangi - , :

: ls /etc/apparmor.d/

abstractions    lightdm-guest-session  usr.bin.evince         usr.sbin.cupsd
cache           local                  usr.bin.firefox        usr.sbin.mysqld
disable         sbin.dhclient          usr.lib.telepathy      usr.sbin.rsyslogd
force-complain  tunables               usr.sbin.cups-browsed  usr.sbin.tcpdump

apparmor:

sudo/etc/init.d/apparmor kill

: Usage: /etc/init.d/apparmor {start|stop|restart|reload|force-reload|status|recache}

apache

+4
3

, : www-data? :

$ chown -R www-data:www-data /media/mithun/Projects
+1

, NTFS ( , chmod)

, / .

, , NTFS- ( , , ntfs-3g)

. ( dev/sdX /path/to/where // ):

  mount -o gid=www-data /dev/sdX /path/where/the/drive/is/mounted 

, www-data.

, . usermap, / Windows ( ) / Linux.

ntfs-3g.usermap usermap, :

 ntfs-3g.usermap /dev/sdX

usermap :

  mount -o usermapping=/path/to/usermap.file /dev/sdX /path/where/the/drive/is/mounted 
+1

, , , Apache , whitelisted.

  • apparmor Apache, . /etc/apparmor.d/. , apparmor .

    $sudo aa-complain/etc/apparmor.d/*

  • Use mod_apparmor? See this

  • Or completely disable apparmor. See this

My preference order will be 1,3,2. That should fix it for you :)

0
source

All Articles