-1

I'm using CENTOS 6.4 with the last version of APACHE.

I was trying to put some files in the "/var/www/html" directory in case i want to download them for my personal use.

I missed with one file's permission after putting it in the directory. now i can access all the files but this one, although i have set its permission to be the same as another accessible file.

The output of ls -l of the two files:

-rw-r--r--. 1 root root 241172480 Mar  5 03:05 name_of_accessible_file
-rw-r--r--. 1 root root 4353378304 Mar  5 20:44 name_of_inaccessible_file

Can anyone explain what is that, and how to files having the same file permission and user and group owner treated differently.

ls -lZ output

-rw-r--r--. root root unconfined_u:object_r:httpd_sys_content_t:s0 name_of_accessible_file

-rw-r--r--. root root unconfined_u:object_r:admin_home_t:s0 name_of_inaccessible_file

and yes, SElinux set to enforcing.

1
  • 1
    Can you add the output of ls -lZ? Also, is SElinux set to enforcing?
    – Cian
    May 17, 2013 at 19:55

1 Answer 1

0

Looks like this is an SELinux issue. To change it, you'll need to change the lable on the inaccessible file so Apache can work with it:

restorecon -v /var/www/html/name_of_inaccessible_file

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .