Curious symlink problem with Apache -- FC12

James Mckenzie jjmckenzie51 at earthlink.net
Wed Nov 3 15:53:05 UTC 2010


Robert Moskowitz <rgm at htt-consult.com> wrote:
>
>Well this is not going well...
>
>On 11/03/2010 10:15 AM, Roberto Ragusa wrote:
>> James Mckenzie wrote:
>>    
>>> Robert Moskowitz<rgm at htt-consult.com>  wrote:
>>>
>>>      
>>>> # ls -lsZ
>>>> total 8
>>>> lrwxrwxrwx root root ?                                Centos-5.5 ->
>>>> /media/d4ae05a3-c60f-489d-8159-e16c9a271f0b/repos/centos/5.5
>>>> lrwxrwxrwx root root ?                                FC12 ->
>>>> /var/hda/files/repo/fedora/FC12
>>>> -rw-r--r-- root root ?                                index.html
>>>>
>>>> selinux is disabled...
>>>>
>>>>        
>>> What are the permissions on the original directories?  The symlink should pick them up and use them.
>>>
>>> The previous comment about Apache following symlinks would apply if BOTH directories were unavailable.
>>>      
>> Also check the permission of the entire path.
>> For example, what about the permission of /media/d4ae05a3-c60f-489d-8159-e16c9a271f0b?
>>
>> Try this,as root:
>>
>> cd /
>> su apache
>>    
>
># cd /
>[root at homebase /]# su apache
>This account is currently not available.
>
Correct and you should NOT be able to login as this user given that it is pointed to /sbin/nologin.
>Huh? So I checked:
>
># grep apache /etc/passwd
>apache:x:48:100:Apache:/var/www:/sbin/nologin
>
>
>
>> cd /media
>> cd d4ae05a3-c60f-489d-8159-e16c9a271f0b
>> cd repos
>> cd centos
>> cd 5.5
>> ls -l
What are the directories permissions?  They need to be at least:

rwxr-xr-x (execute bit has a different function at the directory level and without it you cannot access the directory, I've discovered this completely by 'accident'.)

This needs to be 'so' on all of the superior directories as well.

James McKenzie


More information about the users mailing list