in reply to A CGI script to list the files on my external harddrive

Cannot open /media/EXTERNAL: Permission denied

The difference is the user that is running the script. When you run the script, it's running under your permissions. When the web server server runs it, it's using the web server's permissions.

Check your httpd.conf (assuming Apache) for the User and Group directive, then adjust your FS permissions accordingly.

grep
XP matters not. Look at me. Judge me by my XP, do you?

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.