Solved

writing CGI files under Red HAt Linux

Posted on 2009-05-18
1
194 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
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…

739 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