L
L
lapka-admin2018-04-19 12:49:41
linux
lapka-admin, 2018-04-19 12:49:41

How to give permission to view a file from the web?

I have Ubuntu 16.04 + Apache OS
1. Created a home/ftp directory
2. Using proftpd I logged in via FTP as user and uploaded the index.php file to home/ftp
3. Launching the server ip in the browser says Forbidden You don't have permission to access / on this server.
The problem is in the rights, apparently
. The rights and the user on the ftp folder are:
drwxrwxrwx 2 root root 4096 Apr 19 12:30 ftp
The rights on the index.php itself are:
-rw-r--r-- 1 1003 1003 138 Apr 19 12:37 index.php
Where 1003 is the uid of the user who uploaded this file.
I tried to make index.html and rights 777 - the same result.
What should be done so that the files uploaded by user 1003 are always displayed and work? And the user from which the web server is running was able to interpret the php files. Change user or folder permissions? On whom?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CityCat4, 2018-04-19
@CityCat4

On the user on behalf of which Apache is running. I don’t know what he is in bubunt, they are different.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question