Solved

writing CGI files under Red HAt Linux

Posted on 2009-05-18
1
183 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 500 total points
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now