awohld has asked for the wisdom of the Perl Monks concerning the following question:
The files I'm opening and downloading are 1124891436 and 1124891462. My web server is running as "nobody" and "nobody" has read and write permissions to the directory and files.[root@localhost upload]# ls -al total 56 drw-rw-rw- 3 wohldad nobody 4096 Aug 24 08:51 . drwxr-xr-x 26 root root 4096 Aug 22 00:41 .. -rw-r--r-- 1 nobody nobody 2318 Aug 24 08:50 1124891436 -rw-r--r-- 1 nobody nobody 14726 Aug 24 08:51 1124891462
I get an "The server can't open the file: Permission denied" error.open(DLFILE, "<$file_location/$id") || Error('open', 'file'); @fileholder = <DLFILE>; close (DLFILE) || Error ('close', 'file'); print "Content-Type:application/x-download\n"; print "Content-Disposition:attachment;filename=@filename[0]\n\n"; print @fileholder } sub Error { print "Content-type: text/html\n\n"; print "The server can't $_[0] the $_[1]: $! \n"; exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Opening Files and File / Directory Permissions
by davidrw (Prior) on Aug 24, 2005 at 15:54 UTC | |
|
Re: Opening Files and File / Directory Permissions
by bluto (Curate) on Aug 24, 2005 at 16:07 UTC | |
by awohld (Hermit) on Aug 24, 2005 at 16:49 UTC | |
|
Re: Opening Files and File / Directory Permissions
by lidden (Curate) on Aug 24, 2005 at 15:54 UTC | |
|
Re: Opening Files and File / Directory Permissions
by merlyn (Sage) on Aug 24, 2005 at 15:43 UTC | |
by Limbic~Region (Chancellor) on Aug 24, 2005 at 16:04 UTC | |
by merlyn (Sage) on Aug 24, 2005 at 16:08 UTC | |
by jdporter (Paladin) on Aug 25, 2005 at 18:11 UTC |