Pergunta

I am running Ubuntu 12.04 with Apache. Recently I had an NTFS external drive connected which was mounted with fstab via this setting:

/dev/sdc2  /media/cavalry       auto    rw,user,sync    0       0

I have several directories on this drive that are served by my web server via directory aliases in Apache's configuration. One such directory and its permissions looks like:

drwxrwxrwx 1 root root 4096 May 28 22:42 econ/

However, I have made the switch to an EXT4 filesystem and am attempting to mount with the follow line in fstab:

/dev/sdc2  /media/cavalry       ext4    defaults        0       0

With the same directory having permissions:

drwxrwxrwx 11 josh josh 4096 May 28 22:42 econ/

The problem here is that when the EXT4 file system is mounted I am unable to access this directory from the web (receiving a 'do not have permissions error'). I am unable to see (with the obvious difference that the NTFS directory is owned by root while the EXT4 directory is owned by josh) what could possibly be causing this issue.

The Apache configuration for this directory is as follows:

Alias /econ /media/cavalry/server_backup/econ
<Directory /media/cavalry/server_backup/econ>
       Order allow,deny
       Options Indexes FollowSymLinks MultiViews
       Allow from All
       AuthType Basic
       AuthName "Login"
       AuthUserFile /etc/apache2/passwords/users
       Require user research
</Directory>

If anyone can offer any assistance I would be most appreciative.

Foi útil?

Solução 2

Solved. Apparently the ownership and permission of the mount point itself

/media/cavalry

were changing and I wasn't noticing. Advice to anyone who hits this thread...check the WHOLE path...duh

Outras dicas

There's a lot of irrelevant information here. The important bits are:

drwxrwxrwx 1 root root 4096 May 28 22:42 econ/

works

drwxrwxrwx 11 josh josh 4096 May 28 22:42 econ/

doesn't because:

receiving a 'do not have permissions error'

There is nothing in the Unix permissions that would prevent the webserver from reading the directory - it's readable by all. Implying that you may have some SELinux restrictions in place, or ACLs.

Can you access the directory as a different user than the webserver uid? Does it work when you access it as josh? As root?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top