dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: reading a file w/o permission

  1. #1
    Join Date
    Feb 2004
    Location
    California
    Posts
    2

    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?

  2. #2
    Join Date
    Nov 2002
    Location
    Dartmoor [Holiday]
    Posts
    2,382
    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.

    Adam

  3. #3
    Join Date
    Jan 2004
    Location
    Florida, USA
    Posts
    24
    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



Recent Articles