cannot access files in apache


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers cannot access files in apache
# 1  
Old 12-17-2007
cannot access files in apache

i've never had this happen before, but i cannot access files from the shell in my apache server but i can see them on my localhost and by typing in my ip address in the url i can access and view files. not through the shell tho....

Code:
kumi@throne:/var/www % ls -l templates/decorative 
total 0
?--------- ? ? ? ?                ? templates/decorative/default.css
?--------- ? ? ? ?                ? templates/decorative/images
?--------- ? ? ? ?                ? templates/decorative/index.html
?--------- ? ? ? ?                ? templates/decorative/license.txt

but when i type in http://my.ip.add.ress/templates/decorative i'm accessing these pages no problem. what's the deal????
# 2  
Old 12-17-2007
seems like you do not have read permission for those files.

If you want to check if more than one copies of them are present at your machine, use:
Code:
find / -type f -name "default.css" 2>/dev/null

(check this if you have more than one instances of web server running)
# 3  
Old 12-17-2007
i have read permissions for all in the entire directory:
Code:
throne:/var/www/templates # ls -l
total 108
drwxr--r-- 3 www-data www-data 4096 2007-08-27 05:21 asterisk/
drwxr--r-- 3 www-data www-data 4096 2006-12-13 00:09 bizbox/
drwxr--r-- 3 www-data www-data 4096 2007-10-03 23:42 blogsmith/
drwxr--r-- 3 www-data www-data 4096 2007-07-12 22:09 classicish/
drwxr--r-- 3 www-data www-data 4096 2007-06-17 21:34 deep-blue-website-template/
drwxr--r-- 4 www-data www-data 4096 2006-11-30 16:41 dreamy/
drwxr--r-- 3 www-data www-data 4096 2007-12-16 21:15 Enlighten11/
drwxr--r-- 3 www-data www-data 4096 2006-12-18 11:47 feng_shui/
drwxr--r-- 3 www-data www-data 4096 2007-12-17 00:32 flamenco/
drwxr--r-- 3 www-data www-data 4096 2007-07-19 09:08 hyperglass/
drwxr--r-- 3 www-data www-data 4096 2007-07-02 20:03 illogix/
drwxr--r-- 3 www-data www-data 4096 2007-12-16 21:17 imagination/
drwxr--r-- 2 www-data www-data 4096 2007-02-04 16:32 mandarin/
drwxr--r-- 3 www-data www-data 4096 2007-07-12 22:09 melmac/
drwxr--r-- 3 www-data www-data 4096 2007-08-07 02:10 newave/
drwxr--r-- 3 www-data www-data 4096 2007-04-15 14:29 organicrhythm/
drwxr--r-- 3 www-data www-data 4096 2006-12-10 17:13 rational/
drwxr--r-- 3 www-data www-data 4096 2007-01-10 23:38 redplanet/
drwxr--r-- 3 www-data www-data 4096 2007-12-16 21:33 simpleday/
drwxr--r-- 3 www-data www-data 4096 2007-12-16 21:23 simply_red/
drwxr--r-- 3 www-data www-data 4096 2007-12-16 21:24 smooth_and_sleek/
drwxr--r-- 3 www-data www-data 4096 2007-12-16 21:05 Stylevantage/
drwxr--r-- 4 www-data www-data 4096 2007-11-26 03:39 super_happy/
drwxr--r-- 3 www-data www-data 4096 2007-12-16 21:33 Titanium/
drwxr--r-- 4 www-data www-data 4096 2007-11-26 03:40 toader/
drwxr--r-- 3 www-data www-data 4096 2007-01-07 08:05 veggie/
drwxr--r-- 4 www-data www-data 4096 2007-09-01 19:46 yoghourt/

# 4  
Old 12-17-2007
the ls output for /var/www/templates shows that there is no decorative directory underneath it.

if you do a ls -liq in the /var/www/ directory do you see 2 templates directories with different inode numbers? one maybe followed by a questionmark (?) and "decorative" (i.e. templates?decorative).

If so then you have somehow managed to get a directory or file called templates/decorative.

you should be able to rename it with

find /var/www/ -inode <inode number> -exec mv {} decorative \;

and if that works you can use mv again to pop the (newly renamed) decorative dir into the templates dir
mv decorative templates/
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Web Development

Apache website uri access

Hi i would like to grant access specific to one uri and rest of them should be denied. as follows: http://websitename/example user should be able to access htttp://websitename/other user should be denied (1 Reply)
Discussion started by: raghur77
1 Replies

2. Red Hat

Apache Tomcat(403 Access Denied)

Good evening, i've got a problem. I fail to enter "Manager App" in Apache Tomcat/9.0.0.M9 on server, it says "403 Access Denied». for example, server address is 192.168.1.4, when I type 'localhost ' in the browser and press "Manager App", then everything is ok. but if I enter 192.168.1.4 and press... (0 Replies)
Discussion started by: v.k.l.chr.by
0 Replies

3. Linux

Restricting directory access in Apache server

Hi all, I have a web site that I'm serving on an Apache server, and it has a number of different folders, but I only want the user to be able to access certain ones -- the majority of them I don't want the user to access. I tried modifying my /etc/apache2/conf.d/security file to do this, but I... (1 Reply)
Discussion started by: Zel2008
1 Replies

4. UNIX for Dummies Questions & Answers

kernel giving access for multiple users to access files

hi all, i want to know y kernel is giving access for multiple users to access a file when one user may be the owner is executing that file. Because other user can manipulate that file when the other user is executing that file, it will give the unexpected result to owner . plz help me... (1 Reply)
Discussion started by: jimmyuk
1 Replies

5. Solaris

Apache localhost-access.log

The localhost-access.log has a size 3gb. What can apache2 break log on the parts 300mb, or the other issue, make log every week and index it with prifix current date(localhost-access_date.log)? Please help. (3 Replies)
Discussion started by: sotich82
3 Replies

6. Linux

Apache Server how to set password for all access?

Hello all, I am new to Linux and am trying to set a password for access to Apache server access. I have both Apache and Tomcat installed in my server, Apache forwards the requests to our Tomcat server which servers the java application we have. The Java application is not configured to ask... (1 Reply)
Discussion started by: firefox211
1 Replies

7. UNIX for Advanced & Expert Users

remote web server access (apache)

Hi, I have web server (apache) installed in server-1 and i want to view the web pages from diferent servers also while the web server is running only in one server ....(all the servers are connected to office LAN) right now all the servers have apache running......and CPU utilzation is at its... (2 Replies)
Discussion started by: aditya.ece1985
2 Replies

8. UNIX for Advanced & Expert Users

Apache restrict access with certificates

Hello! Does anyone know if it's possible to restrict access to apache webserver with certificates? What I want is that if a user has a certificate in his browser then he get's access, if not show error or another page. I would be very happy if someone knew! /D (2 Replies)
Discussion started by: Esaia
2 Replies

9. UNIX for Dummies Questions & Answers

Can't access apache

I have installed RedHat 9.0 and Apache. Everything works fine... I type http://localhost and the default webpage comes up... But when I go to another computer that is on the network and type http://10.10.1.38 (the computer) it comes up "The Page Cannot Be Displayed" I am logged in as the Root... ... (0 Replies)
Discussion started by: pokermagic
0 Replies

10. UNIX for Dummies Questions & Answers

Need help to access/mount so to access folder/files on a Remote System using Linux OS

Hi I need to access files from a specific folder of a Linux system from an another Linux System Remotely. I know how to, Export a folder on One SCO System & can access the same by using Import via., NFS in the Sco Unix SVR4 System using the scoadmin utility. Also, I know to use mount -t ... (2 Replies)
Discussion started by: S.Vishwanath
2 Replies
Login or Register to Ask a Question