Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Reading a file outside of cgi-bin?

Posted on 2004-09-04
8
Medium Priority
?
178 Views
Last Modified: 2013-12-25
I'm attempting to create a log parser for an online game of mine.

The game produces logs to ~/dystopia/accounts/METALOG

Our websetup is such that ~/public_html/ points to /var/www/html/bd and is setup to execute cgi.

We wrote a cgi program in C++ to read the files in /home/bd/dystopia/accounts/METALOG/... but it fails, saying that it cannot open the files...

I don't think it's a permission problem, because we're very loose with the permissions (775)

Can anyone help please?
0
Comment
Question by:Krule
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 16

Expert Comment

by:xDamox
ID: 11982353
The permission is wrong.

the permission is:

owner = Read, write and execute
group = Read, Write and execute
other = execute

you need to set the permission to: 774

hope this helps
0
 
LVL 3

Author Comment

by:Krule
ID: 11983003
Right, that was a typo, my mistake

Thats not the problem :(
0
 
LVL 4

Expert Comment

by:divt
ID: 11985403
Let me try to summarize:

The game produces logs to ~/dystopia/accounts/METALOG
Websetup is such that ~/public_html/ points to /var/www/html/bd and is setup to execute cgi.
You read the files in /home/bd/dystopia/accounts/METALOG/...

Shouldn't you read the files here?
/home/dystopia/accounts/METALOG/...

0
 
LVL 4

Expert Comment

by:divt
ID: 11985413
Also, try outputing these server environments for easier debugging:

DOCUMENT_ROOT  The file system path to the script being executed
SCRIPT_FILENAME  The full path and filename of the script being executed.

Good luck!
0
 
LVL 48

Accepted Solution

by:
Tintin earned 500 total points
ID: 11986288
xDamox.

Nothing wrong with permissions of 775, although better they are 755 or 555.

BTW, 774 is not the permissions you mention, you meant to say 771.

However, it depends on whether we are talking about the directory or the file.

Krule.

What permissions do you have on the directory *and* the files?  If they are all 775 or even 755, then there is no permission problem.

What is the exact error message you get when you try to open the files?
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question