Koozali.org: home of the SME Server

befuddled: cannot access files from a directory

Mahmood Al-Yousif

befuddled: cannot access files from a directory
« on: November 04, 2001, 04:09:09 PM »
this is an interesting one. everything was running perfectly on my 4.1.2 with all the mods etc installed, but as of a couple of days ago, I cannot access files from only one directory:

 /home/e-smith/files/primary/html/modules

If I asked for a file directly. ie, if I enter http://www.myserver.com/modules/image.gif IE6 responds with a 404!! The file IS present and permissions are wide open on the modules directory and file (777)

I looked for .htaccess and .htpasswd and non are present, I didn't touch the httpd.conf file either.

Now the interesting thing is if my website (I run PostNuke) asks for module, it brings up the module okay, minus images.

The question is, what can I do to reset permissions to default? I've tried:

chown -R www:www /home/e-smith/files/primary/html
chown -R 777 /home/e-smith/files/primary/html

and didn't make any difference!

appreciate help!

Darrell May

Re: befuddled: cannot access files from a directory
« Reply #1 on: November 04, 2001, 08:06:06 PM »
Mahmood Al-Yousif wrote:

> chown -R www:www /home/e-smith/files/primary/html
> chown -R 777 /home/e-smith/files/primary/html

I believe it should be:

chown -R admin:shared /home/e-smith/files/primary/html
chmod -R 640 /home/e-smith/files/primary/html/*

Then change rights for all the directories, one by one to:

chmod 2750 /home/e-smith/files/primary/html
chmod 2750 /home/e-smith/files/primary/html/dir1
chmod 2750 /home/e-smith/files/primary/html/dir2 ...

Regards,

Darrell

Mahmood Al-Yousif

Re: befuddled: cannot access files from a directory
« Reply #2 on: November 05, 2001, 09:57:00 AM »
Thanx for the suggestion Darrel.

I notice from the httpd.conf file that the Apache process is defined to be owned by www:www, so if I defined admin:shared and 640/750 it will not be able to display anything. I tried just to be sure.

I changed all to www:www and 644/755, but unfortunately that didn't solve my problem.

BUT looking into the /var/log/httpd/error_log file, I found that Apache was trying to load these image files from an ibay I recently created called "modules"!! When I removed that ibay all worked perfectly!

So eSmith was confusing Apache; whenever a call comes in for loading for instance    modules/Calendar/images/cal2.gif   eSmith goes into the ~modules/Calendar/images/cal2.gif rather than html/modules/Calendar....

weird!

Mahmood