Answer the question
In order to leave comments, you need to log in
How to set permissions on a folder to be accessed from Apache?
Installed Apache2, everything is fine, but you need to change the /var/www shared folder to /mnt/sdcard0/htdocs
Edited the /etc/apache2/apache2.conf config: replaced /var/www with the desired folder, but, oddly enough, I get an error about folder permissions, how do I change them?
UPD#1
Tried like this but get error
$sudo chown -R www-data:www-data /mnt/sdcard0/htdocs
Error: chown: changing ownership of 'htdocs': Operation not permitted
Answer the question
In order to leave comments, you need to log in
Judging by the error message, it was not possible to change the rights to the folder.
Considering that sdcard is indicated in the folder path, this is a memory card and it is formatted in FAT. FAT does not support access rights, so the OS considers (usually) that the card and all files on it belong to the superuser, the access rights are set to the mask 022 (755 for folders and 644 for files).
You either need to change the mount options for the memory card (it seems that this is indicated somewhere in fstab, I don’t remember anymore), or reformat the card to ext[234] or any other file system that your kernel supports and that supports file permissions.
Look under whom the Apache works. And put it on.
In general, look at the rights to var/www and set the same
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question