How to fix a permissions problem on www folder?
7,881
run this command in the terminal after navigating to www folder:
sudo chmod 755 *
Author by
95faf8e76605e973
Updated on September 18, 2022Comments
-
95faf8e76605e973 over 1 year
I have created a directory in my
www
folder using terminal androot
user. Then, create some text files in that folder (with terminal androot
user).Now, when I want to access these files and directory via browser, Apache said:
403 Forbidden. You don't have permission to access /folder on this server.
Other files and folders in
www
directory are accessible via browser (I uploaded them via FTP client).How can this be fixed?
-
95faf8e76605e973 about 11 yearsfolder is set to
755
, and files are644
. I tried this command:chown www-data:www-data folder
, but it said:invalid user: www-data
-
prophecy201 about 11 yearsDid you installed apache from apt? It should create a user and a group called "www-data". What does
id www-data
say? Take a look in "/etc/apache2/envvars" What is set forexport APACHE_RUN_USER
andexport APACHE_RUN_GROUP
? Try to chown your files to this user and group.