2016-03-16 18:36 阅读 52

符号链接权限在/ var / www中被拒绝

I'm having some issues with permissions when it comes to symbolic links on my apache2 webserver. I originally had a data/ in /var/www , but was it getting too large for the directory and I kept getting a partition full warning. I'd like to move the data/ folder to /home/processor/Documents/sandbox/www_data/

I moved all the data to www_data and created a symbolic link in /var/www

ln -s /home/processor/Documents/sandbox/www_data data

Checking the link:

:/var/www$ ls -l data
lrwxrwxrwx 1 processor processor 43 Mar 16 17:03 data -> /home/processor/Documents/sandbox/www_data/

An example of the data shows that all permissions seem reasonable to me:

:/var/www$ ls -l data/2/15/2015/8/25/10/54/wf/2_15_2015_8_25_10_54_11*
-rwxrwxrwx 1 processor processor 475643 Mar 16 16:58 data/2/15/2015/8/25/10/54/wf/2_15_2015_8_25_10_54_11.png
-rwxrwxrwx 1 processor processor  53539 Mar 16 16:58 data/2/15/2015/8/25/10/54/wf/2_15_2015_8_25_10_54_11_thumb.png

This is whats in between the <VirtualHost *:80> </VirtualHost> in my /etc/apache2/sites-available/000-default.conf:

<Directory />
    Options FollowSymLinks
    AllowOverride None

<Directory /var/www/>
    Options FollowSymLinks Indexes MultiViews
    AllowOverride None
    Order allow,deny
    allow from all

But when trying too access it from the site I get "Forbidden You don't have permission to access /data/2/15/2015/8/25/9/46/wf/2_15_2015_8_25_9_46_28.png on this server."

I've read through a bunch of threads and have chown www-data:www-data, I've chmod -R 777 everything, and changed my 000-default.conf to numerous varieties of the same thing, but nothing is working. I don't know where to go from here.

Any suggestions would be greatly appreciated.


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    dqqfuth6736 dqqfuth6736 2016-03-17 20:29

    It has to do with the permissions of /home/processor. The entire path needs a certain degree of privileges and the home directory did not have them. The only thing that needed to be done was to allow access to read and execute

    sudo chmod 755 /home/processor/
    点赞 评论 复制链接分享