Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

hey there i just made a website (more like a file manager) and hosted it on apache 2.4 on ubuntu 14.04 LTS but i can't seem to access the icons folder in var/www/html/icons, what i get is a 403 access forbidden error, but when i change the name to icon from icons then only i can access the directory given that the name is icon and not icons, but when i go to a sub directory in icons folder it gives me a 404 not found error but the file exists. how do i get around this problem. thanks!

using ls -l '/var/www/html/icons' gives

drwxrwxrwx  2 roy roy 4096 Jun  9 06:57 app_add_remove_programs
drwxrwxrwx  2 roy roy 4096 Jun  7 07:19 backup_restore
drwxrwxrwx  2 roy roy 4096 Jun  7 09:57 cut
drwxrwxrwx  2 roy roy 4096 Jun 10 07:00 empty_trash
drwxrwxrwx 24 roy roy 4096 Jun 13 11:35 extensions
drwxrwxrwx  2 roy roy 4096 Jun  7 07:55 files_copy_file
drwxrwxrwx  2 roy roy 4096 Jun  6 05:50 files_new_file
drwxrwxrwx  2 roy roy 4096 Jun  6 05:54 files_upload_file
drwxrwxrwx  2 roy roy 4096 Jun  6 05:55 files_web_file
drwxrwxrwx  2 roy roy 4096 Jun  9 13:42 folder_my_documents
drwxrwxrwx  2 roy roy 4096 Jun  9 09:01 folder_my_music
drwxrwxrwx  2 roy roy 4096 Jun  9 13:40 folder_my_pictures
drwxrwxrwx  2 roy roy 4096 Jun  9 13:41 folder_my_videos
drwxrwxrwx  2 roy roy 4096 Jun  6 04:24 folder_new
drwxrwxrwx  2 roy roy 4096 Jun  6 08:05 full_trash
drwxrwxrwx  2 roy roy 4096 Jun  6 05:25 misc_delete_database
drwxrwxrwx  2 roy roy 4096 Jun  7 07:11 misc_settings
drwxrwxrwx  2 roy roy 4096 Jun  7 08:07 notes
drwxrwxrwx  2 roy roy 4096 Jun  7 09:59 paste
drwxrwxrwx  2 roy roy 4096 Jun  6 05:46 rename
drwxrwxrwx  2 roy roy 4096 Jun  9 13:44 settings
drwxrwxrwx  2 roy roy 4096 Jun  6 05:52 upload_folder

i even tried sudo chmod -R 755 /var/www/html/icons and sudo chmod -R 777 /var/www/html/icons

directory structure

var
 | -> www
 |     ->html
 |         ->icons
 |            ->rename, etc, etc, etc

think my folder name icons collide with icons folder in usr/share/apache2/icons

output of ls -l /var/www/html

-rwxrwxrwx  1 www-data www-data   1638 Jun 12 09:09 clock_script.js
-rwxrwxrwx  1 www-data www-data    474 Jun 22 05:24 color.php
drwxrwxrwx  2 www-data www-data   4096 Jun 22 04:37 darsiv_clocks
-rwxrwxrwx  1 www-data www-data   8038 Jun 22  2014 darsiv.js
-rwxrwxrwx  1 www-data www-data    388 Jun  6 00:52 darsiv.php
-rwxrwxrwx  1 www-data www-data  20161 Jun 22  2014 directory.php
-rwxrwxrwx  1 www-data www-data   6045 Jun  8 15:24 dll.php
-rwxrwxrwx  1 www-data www-data   4852 Jun 10 16:46 dl.php
-rwxrwxrwx  1 www-data www-data    400 Jun 22  2014 file_extension.php
-rwxrwxrwx  1 www-data www-data   3921 Jun 19 12:38 file_folder_opener.php
-rwxrwxrwx  1 www-data www-data    433 Jun 13 04:47 functions.php
-rwxrwxrwx  1 www-data www-data    561 Jun 12 10:00 generalScript.js
drwxrwxrwx 24 www-data www-data   4096 Jun 22 09:00 icons
-rwxrwxrwx  1 www-data www-data   3744 Jun  9 05:59 index.php
-rwxrwxrwx  1 www-data www-data     56 Jun  2 16:07 index.php~
-rwxrwxrwx  1 www-data www-data 277976 Nov 14  2013 jquery-1.6.4.min.js
-rwxrwxrwx  1 www-data www-data  48864 May 27 23:57 jquery.mobile-1.0.min.css
-rwxrwxrwx  1 www-data www-data  81904 May 27 23:57 jquery.mobile-1.0.min.js
-rwxrwxrwx  1 www-data www-data  13597 Jun 12 13:54 jquery.slimscroll.js
-rwxrwxrwx  1 www-data www-data    450 Jun 19 10:19 jquery.tshift.min.js
-rwxrwxrwx  1 www-data www-data    410 Jun 13 04:25 login.js
-rwxrwxrwx  1 www-data www-data   1118 Jun  5 07:48 login.php
-rwxrwxrwx  1 www-data www-data  37128 Jun 22  2014 main.php
drwxrwxrwx  6 www-data www-data   4096 Jun 22 04:37 music_player
drwxrwxrwx 10 www-data www-data   4096 Jun 22 04:25 MyComputer
drwxrwxrwx  9 www-data www-data   4096 Jun 22 04:24 others
-rwxrwxrwx  1 www-data www-data     86 Jun 10 16:18 page.php
-rwxrwxrwx  1 www-data www-data      3 Jun  5 05:49 password.txt
-rwxrwxrwx  1 www-data www-data      2 Jun  4 12:07 password.txt~
drwxrwxrwx  4 www-data www-data   4096 Jun 22 04:37 pdf
-rwxrwxrwx  1 www-data www-data     68 Jun 15 19:52 pdf_loader.php
-rwxrwxrwx  1 www-data www-data   1586 Jun 17 01:05 player.html
-rwxrwxrwx  1 www-data www-data   4842 Jun 16 11:39 respective_file_window.php
-rwxrwxrwx  1 www-data www-data   8605 Jun 22 05:24 sample.php
-rwxrwxrwx  1 www-data www-data    634 Feb 23 08:14 script1.js
-rwxrwxrwx  1 www-data www-data  20786 Jun 22 11:30 style1.css
-rwxrwxrwx  1 www-data www-data  11248 Jun  4 11:24 style1.css~
drwxrwxrwx  2 www-data www-data   4096 Jun 22 04:37 wallpaper
-rwxrwxrwx  1 www-data www-data   5714 Jun 19 12:01 windowFunction.js
drwxrwxrwx  4 www-data www-data   4096 Jun 22 04:37 window_menu
-rwxrwxrwx  1 www-data www-data   1232 Jun 11 15:52 windowPriority.js

output of ls -la '/var/www/html/icons'

drwxrwxrwx 24 www-data www-data 4096 Jun 22 09:00 .
drwxrwxrwx 10 www-data www-data 4096 Jun 22 09:52 ..
drwxrwxrwx  2 www-data www-data 4096 Jun  9 06:57 app_add_remove_programs
drwxrwxrwx  2 www-data www-data 4096 Jun  7 07:19 backup_restore
drwxrwxrwx  2 www-data www-data 4096 Jun  7 09:57 cut
drwxrwxrwx  2 www-data www-data 4096 Jun 10 07:00 empty_trash
drwxrwxrwx 24 www-data www-data 4096 Jun 13 11:35 extensions
drwxrwxrwx  2 www-data www-data 4096 Jun  7 07:55 files_copy_file
drwxrwxrwx  2 www-data www-data 4096 Jun  6 05:50 files_new_file
drwxrwxrwx  2 www-data www-data 4096 Jun  6 05:54 files_upload_file
drwxrwxrwx  2 www-data www-data 4096 Jun  6 05:55 files_web_file
drwxrwxrwx  2 www-data www-data 4096 Jun  9 13:42 folder_my_documents
drwxrwxrwx  2 www-data www-data 4096 Jun  9 09:01 folder_my_music
drwxrwxrwx  2 www-data www-data 4096 Jun  9 13:40 folder_my_pictures
drwxrwxrwx  2 www-data www-data 4096 Jun  9 13:41 folder_my_videos
drwxrwxrwx  2 www-data www-data 4096 Jun  6 04:24 folder_new
drwxrwxrwx  2 www-data www-data 4096 Jun  6 08:05 full_trash
drwxrwxrwx  2 www-data www-data 4096 Jun  6 05:25 misc_delete_database
drwxrwxrwx  2 www-data www-data 4096 Jun  7 07:11 misc_settings
drwxrwxrwx  2 www-data www-data 4096 Jun  7 08:07 notes
drwxrwxrwx  2 www-data www-data 4096 Jun  7 09:59 paste
drwxrwxrwx  2 www-data www-data 4096 Jun  6 05:46 rename
drwxrwxrwx  2 www-data www-data 4096 Jun  9 13:44 settings
drwxrwxrwx  2 www-data www-data 4096 Jun  6 05:52 upload_folder
share|improve this question
    
What is the output of ls -l /var/www/html? –  muru Jun 22 at 17:59
    
i edited my question to include the output of ls -l /var/www/html –  SRC SRC Jun 22 at 18:13
    
Verify if is present .htaccess file in /var/www/html/icons. Use ls -la command and verify apache configuration, url path can be different from directory structure if are present alias –  Letizia Jun 22 at 18:19
    
edited it again –  SRC SRC Jun 22 at 18:25
    
And what about httpd.conf? Did you find any alias directive? –  Letizia Jun 22 at 22:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.