Solved

writing CGI files under Red HAt Linux

Posted on 2009-05-18
1
197 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
[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
1 Comment
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 500 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

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…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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

688 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