I'm trying to not give 777 permission in my
/var/www/html folder, but I want to edit my files without
sudo. So I though in create a symlink of a folder in my home directory within
/var/www/html. I created it using
sudo ln -sT /home/andre/www/moodle/ moodle , and the
ls -la output is this:
andre@andre-270E5G:/var/www/html$ ls -la total 8 drwxr-xr-x 2 root root 4096 Mai 4 10:20 . drwxr-xr-x 4 root root 4096 Abr 29 14:29 .. lrwxrwxrwx 1 root root 23 Mai 4 10:20 moodle -> /home/andre/www/moodle/
So, my moodle folder has read, write and execute permissions for everyone, and thats not what I want. I used the command
sudo chmod -R 775 moodle/ trying to change it, but it stayed with read, write and execute permissions to all. I tried the same with the moodle folder in
/home/andre/www/moodle, but it stayed the same. The output of
ls -la in
andre@andre-270E5G:~/www$ ls -la total 28 drwxrwxr-x 3 andre andre 4096 Mai 4 10:02 . drwx------ 49 andre andre 20480 Mai 4 10:01 .. drwxrwxr-x 41 andre andre 4096 Mai 4 10:02 moodle
So the folder
/home/andre/www/ has the permissions I want.
As an additional problem, when I access
localhost/moodle I get 403 Forbidden error.
What am I doing wrong here?