Find the answer to your Linux question:
Results 1 to 4 of 4
I have ran into a permissions problem. It seems that any file I have created with Fedora I can browse to in Firefox. I cannot browse to files that I ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    33

    permissions

    I have ran into a permissions problem. It seems that any file I have created with Fedora I can browse to in Firefox. I cannot browse to files that I have downloaded from the internet or copied locally across our network. I changed file permissions to 755 and 777 for these files. I even thought that maybe it was the php file content that was causing the issue. So, I copied the file content from file 2 into file 1. File 1 was the file I could always browse to since I created it in Fedora. I could still browse to file 1 after it had file 2's content. So, I know the content had nothing to do with this issue.

    I look at the permissions and they appear the same for both files. I am not sure why I cannot open the other files.

    I downloaded phpMyAdmin. I cannot hit any of these files in a browser.

    I also copied some files from a a backup location we have internally. I cannot browse to any of these files either. I used chmod 777 filename. Even after doing that I could not hit any of the files. I moved the files into my document root directory ( /var/www/html ) and I still cannot browse to these files.

    Any ideas?

  2. #2
    Just Joined!
    Join Date
    Dec 2009
    Posts
    33
    Oh ya, here is the error I get in the browser with php errors turned on.

    "Warning: Unknown: Failed to open stream: Permissions denied in Unknown on line 0

    Fatal error: Unknown: Failed opening required 'var/www/html/index2.php' ( include_path = '.:/usr/share/pear:/usr/share/php') in Unknown on line 0'

    I googled this error and everything I find talks about permissions. I am no linux master, so I may have messed something up with the permissions. But, when I view the permissions, they all say either r-x or rwx depending if I chose 777 or 755 for the permissions.

  3. #3
    Linux Newbie
    Join Date
    Dec 2009
    Posts
    241
    Failed opening required 'var/www/html/index2.php
    Is there a require statement in the file?
    If not, I would tip on an error in the web-server configuration.

    Is that the file you've tried to open at that request?

    Which user is the owner? The web-server user? or your user?
    I know, it shouldn't make any difference.

  4. #4
    Just Joined!
    Join Date
    Dec 2009
    Posts
    33
    Yes, there are required files. At least for my latest testing, the required file is not in the directory. I had moved the file into a different directory. I did this because there was a file that worked in the new directory. So, I wanted to make sure that it was not the directory's permissions causing a problem. That would possibly explain the error now. I am going to ask the person that set up the files to see if there are other required files missing. They have files set up that run. So, if I can compare files, then maybe that is the issue. ( I need permissions which has stopped me from already doing this, but hopefully, I can do this soon )

    However, I originally tested browsing to the file after I first copied them from the back up location. The required file was in the same directory in that situation. I still received this same error. But, maybe there are other files as noted above that I don't have.

    Yesterday, I also tried a different test. I copied all of the content from file 2, which I cannot hit in a browser, and pasted it into file 1, which I could hit in the browser. Then, I could not hit file 1 in the browser with file 2's content. This supports your suggestion about the required files.

    The owner for all files is root:root. I changed it to that. I had the owner as my user. No matter which owner I had for the files, I could not browse to the files.

    The web-server configuration I did not touch. I used yum to install apache, php and mysql. Apache obviously is running as I can hit files I create. PHP is automatically set up as I can hit a php page with the phpinfo() in it. Also, I made another php page with 'echo "hi";' in it. I can browse to that page in the browser and I see the word 'hi'. I can enter into mysql and have already made a table. So, most of the configuration must already be correct from the yum installer?

    Although, I did make a few changes according to a web page's instructions ( I still cannot post the web link until a few more posts in this forum, so I want to obey the rules. I can post the link later after I have made 15 posts )

    I will post back with more info after I talk to the other guy tomorrow. Thanks for the suggestions so far!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...