S
S
Shlyahten2017-01-25 23:35:59
linux
Shlyahten, 2017-01-25 23:35:59

How to move a site on apache to another folder?

Hello. I have a LAMP bundle, I want to transfer the site from the internal folder var/www to a flash drive in media/XX/www I
specified these directives in the config, but after that the site does not open, it says that access is denied (403). I understand that the www-data user does not have access to this folder.
I tried to change the FS format, now it costs fat32, as I understand it, this FS does not support access rights at all. Before that, on ext4 I tried to set www-data to everyone, but also to no avail.
I hope there is a solution to this problem. Thank you.
Here are the site folders:

[email protected]:/media/pi/www# ls -l
итого 24
drwx------ 2 pi pi 8192 янв 23 21:11 html
drwx------ 3 pi pi 8192 янв 20 23:36 key.xn--e1alhsoq4c.xn--p1ai
drwx------ 3 pi pi 8192 янв 23 21:21 xn--e1alhsoq4c.xn--p1ai

It is impossible to change the owner or rights, since the FS is FAT32.
domain config file:
<VirtualHost *:80>
[...]
  ServerAdmin [email protected]
  DocumentRoot /media/pi/www/html
[...]
</VirtualHost>

Log:
AH00163: Apache/2.4.10 (Raspbian) mpm-itk/2.4.7-02 configured -- resuming normal operations
[Thu Jan 26 06:25:24.088448 2017] [core:notice] [pid 1056] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 26 07:03:24.311724 2017] [authz_core:error] [pid 19285] [client 123.151.42.61:10954] AH01630: client denied by server configuration: /media/pi/www/html/
[Thu Jan 26 10:21:39.042098 2017] [authz_core:error] [pid 21526] [client 94.19.27.230:51126] AH01630: client denied by server configuration: /media/pi/www/html/
[Thu Jan 26 10:21:39.073230 2017] [authz_core:error] [pid 21527] [client 94.19.27.230:51128] AH01630: client denied by server configuration: /media/pi/www/html/ncsi.txt, referer: http://94.19.***.***/
[Thu Jan 26 10:21:39.109355 2017] [authz_core:error] [pid 21528] [client 94.19.27.230:51133] AH01630: client denied by server configuration: /media/pi/www/html/HNAP1, referer: http://94.19.***.***/
[Thu Jan 26 10:33:10.847692 2017] [authz_core:error] [pid 21627] [client 91.196.50.33:57717] AH01630: client denied by server configuration: /media/pi/www/html/testproxy.php
[Thu Jan 26 10:41:58.590299 2017] [authz_core:error] [pid 21756] [client 122.224.153.122:51539] AH01630: client denied by server configuration: /media/pi/www/html/
[Thu Jan 26 10:55:02.006686 2017] [authz_core:error] [pid 21849] [client 118.193.27.11:33037] AH01630: client denied by server configuration: /media/pi/www/html/

I probably sent the wrong logs, here's another one with an error:
AH00035: access to /index.html denied (filesystem path '/media/pi/www') because search permissions are missing on a component of the path

[email protected]:/etc/apache2/sites-available# namei -m /media/root/www/html/index.php
f: /media/root/www/html/index.php
 drwxr-xr-x /
 drwxr-xr-x media
 drwxr-xr-x root
 drwxr-xr-x www
 drwxr-xr-x html
 -rw-r--r-- index.php

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
solalex, 2017-02-02
@solalex

make SELINUX=disabled in /etc/selinux

S
Shlyahten, 2017-02-02
@Shlyahten

In short, there are too many hemorrhoids - I'll go buy a larger flash drive. ¯\_(ツ)_/¯

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question