[CentOS] No Such File...

Craig White craigwhite at azapple.com
Fri Nov 6 20:44:00 UTC 2009

On Fri, 2009-11-06 at 15:31 -0500, Victor Subervi wrote:
> My bad. I meant index.py and the permissions were the same. Trying to
> resolve the problem, I have discovered that if I create the files from
> the command prompt as root they work. I originally ftp'd them to the
> server as another user. So I chown'd to root.root and chmod to 755 and
> it *still* doesn't work. Only the test files I create on the server.
> Why would that be?
> [root at 13gems global_solutions]# ls -al | grep test.py
> -rwxr-xr-x  1 root root    298 Nov  6 12:24 test.py
> [root at 13gems global_solutions]# ls -al | grep test2.py
> -rwxr-xr-x  1 root root   5716 Nov  6 12:25 test2.py
> [root at 13gems global_solutions]# ls -al | grep index.py
> -rwxr-xr-x  1 root root    316 Nov  6 07:05 index.py
> [root at 13gems global_solutions]# ls -al | grep template.py
> -rwxr-xr-x  1 root root   5806 Nov  6 07:06 template.py
> -rwxr-xr-x  1 root root   6093 Nov  6 07:06 template.pyc
> where test.py is identical to index.py (other than the necessary
> import) and template is identical to test2.py
> TIA,
that sounds like SELinux

ls -lZ and you will find that the files you create in place have a
different security context than the ones you copied into place.

fixfiles relabel /var/www/html 
# might just work

touch /.autorelabel 
# and then reboot will relabel all copied files to the correct contexts
for the location

or you could turn off SELinux and reboot


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the CentOS mailing list