Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

writing CGI files under Red HAt Linux

Posted on 2009-05-18
1
Medium Priority
?
209 Views
Last Modified: 2013-12-06
I am trying to write copy some files from a CGI written in Perl to an USB disk already mounted. I have tried some solutions and all failed:
1. I tried to create the directory with mkpath, and I found that this function throws an error: permission denied.
2. I tried to copy the files to a directory created in /media/usbdisk/mydir/. The copy failed, another time permission denied.
3. I tried to write a file with the list of files to write, so another script get the files and copy them to the appropriate directory. I have followed the link: https://secure.experts-exchange.com/index.jsp?srid=UVinBiQSsEhwpSxfk2Ph1A%3D%3D&redirectURL=/Programming/Languages/Scripting/CGI/Q_23008561.html&rsid=20#a20429742, but it does not work.

Can anyone give me an advice.

Thanks in advance
0
Comment
Question by:dpeinador
1 Comment
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 2000 total points
ID: 24412956
What do you mean "writing CGI files" ?

Is your CGI executing as a normal CGI would, under the web server? If so, then the CGI runs as the web owner (probably http or apache) which does not have permissions on the /media/usbdisk path).

Or, if you are physically trying the copy, what user are you logged in as? Try root. What are the ownership / perm masks of the USB directory? (try ls -l)

Your question is a bit ambiguous as to who / what files you are trying to copy.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

972 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