Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a cronjob running as root that compiles a java program and moves it into my document root where i have the ability to download it using php, trouble is apache wont even allow read access to the compiled program no matter what owner/group/permissions i give it.

$ ll -rwxrwxrwx 1 root root 3422 Jan 5 12:24 jim_HgHDJQDJQWIDIJQWIDUQIU928121818.class

But when i check using php the results are as so ;/

Name: jim_HgHDJQDJQWIDIJQWIDUQIU928121818 Size: - Permission: u--------- Owner/Group: / Create time: 1970-01-01 00:00:00 Access time: 1970-01-01 00:00:00 Modify time: 1970-01-01 00:00:00

I am running centos 5.8 with apache & openjdk 7 installed.

Any help is appreciated.

share|improve this question

migrated from Jan 6 '13 at 0:43

This question came from our site for professional and enthusiast programmers.

why do you feel it is a UNIX read permission problem and NOT a configuration problem on apache level ? At apache we need to specify which all directories/Files can be read ! – Deepak Jan 5 '13 at 19:46
Odd that the creation, access, and modification times are all set to the UNIX Epoch. Perhaps there's a bug with either the filesystem or the way Apache is handling the permissions? – Makoto Jan 5 '13 at 19:53
The filename listed in the PHP results is different -- it's missing the .class suffix. Is this intentional? – duskwuff Jan 5 '13 at 20:13
This was a mistype when typing out the question. – Reree Efref Jan 5 '13 at 20:18
Well i renamed jim.class to jim.html and replaced the bytecode with "test" and it still cannot be read.... "You don't have permission to access /jim.html on this server.". All my other files have exactly the same permissions and they load correctly. – Reree Efref Jan 5 '13 at 20:20

Your Answer


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