Results 1 to 3 of 3

Thread: reading a file w/o permission

  1. #1
    Join Date
    Feb 2004

    reading a file w/o permission

    is there any way to read a file owned by root? I have a file that is updated automatically and it's owned by root with no access for anyone else, but i want to display it's contents on a php document... is there any way other than chmodding it every time?
    I am governor Jerry Brown
    My aura smiles and never frowns

  2. #2
    Join Date
    Nov 2002
    Dartmoor [Holiday]
    You will probably need to get root to do a chmod 644 or similar (giving the read permission to all) so that PHP can read the file. Any means of bypassing normal security restrictions through PHP is a serious bug. If necessary, you could perhaps get a shell script to run the chmod at appropriate times.

    "If youíre not using valid HTML, then you havenít created a Web page. You may have created something else, but it isnít a Web page." - Joe Clark

    Do something amazing (USA) | Make Poverty History

  3. #3
    Join Date
    Jan 2004
    Florida, USA
    Adam is right, however if it's not a php file, you could access the file with an http connection just by using file_get_contents() (4.3.3) or file/fopen() using the web address.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center