How to make apache in debian access the resource on the window's vfat filesystem?
0
votes
1
answer
340
views
In the post access resource on window'sntfs ,we solve the problem ,succeded in making apache in debian access the resource on the window's ntfs filesystem,now i want to make apache in debian access the resource on the window's vfat filesystem.
The disk partition
sda2
is vfat
format.
sudo blkid |grep 995A
/dev/sdb2: LABEL="SHARED" UUID="5E9C-995A" TYPE="vfat" PARTLABEL="Basic data partition" PARTUUID="efdeb9ab-e920-40e6-9d24-df672b8806e9"
I write a config in /etc/fstab
to mount it automatically.
UUID=5E9C-995A /media/debian/SHARED vfat auto ,sync,umask=000 ,rw 0 0
Now the /dev/sda2
can be mounted automatically.
My apache setting on debian
:
cat /etc/apache2/sites-enabled/000-default.conf
ServerName localhost
DocumentRoot /media/debian/SHARED/project
Alias /project "/media/debian/SHARED/project/build/html"
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
Set permission for /media/debian/SHARED/project
.
sudo chmod -R 644 /media/debian/SHARED/project
Restart my apache:
sudo systemctl restart apache2
To input 127.0.0.
and 127.0.0.1/project
in firefox.
Forbidden
You don't have permission to access this resource.
Apache/2.4.25 (Debian) Server at 127.0.0.1 Port 80
To check the log :
sudo cat /var/log/apache2/error.log
[Wed Aug 12 17:11:58.727479 2020] [core:error] [pid 3149] (13)Permission denied: [client 127.0.0.1:56434] AH00035: access to / denied (filesystem path '/media/debian/SHARED') >because search permissions are missing on a component of the path
[Wed Aug 12 16:53:37.958950 2020] [core:error] [pid 3061] (13)Permission denied: [client 127.0.0.1:56158] AH00035: access to /project/ denied (filesystem path '/media/debian/SHARED') because search permissions are missing on a component of the path
Display the ownership on /media/debian/SHARED/project
ls -al /media/debian/SHARED/project
total 304
drwxr-xr-x 14 root root 16384 Aug 12 14:19 .
drwxr-xr-x 4 root root 16384 Jan 1 1970 ..
drwxr-xr-x 4 root root 16384 Aug 12 14:18 build
/media/debian/SHARED
located on vfat
disk partition,it can't be change ownership with chown
.
sudo chown -R www-data.www-data /media/debian/SHARED/project
chown: changing ownership of '/media/debian/SHARED/project': Operation not permitted
How to make apache access the resource on vfat partition ,step by step solution is apreciated.
Asked by showkey
(499 rep)
Aug 15, 2020, 03:01 AM
Last activity: Aug 15, 2020, 03:51 PM
Last activity: Aug 15, 2020, 03:51 PM