icon Learn how to get the most out of Surmunity - read our forum tips here! | Welcome! Please register to access all of our features.
Old March 18th, 2008, 10:49 PM   #1 (permalink)
Registered User
Seasoned Poster
 
Joined in Oct 2007
54 posts
Gave thanks: 3
Thanked 3 times
I can't write files with CGI Perl

I have an old script that needs to run as CGI Perl. I moved it to a new server, but am not able to write files, even in a directory that is set to 777. I am thinking this might be because Perl is running as an unknown user, and doesn't have execute permissions to the directory containing the directory I am trying to write too - which means it can't set it as it's working directory?

Does anyone know how I need to set my permissions to let Perl be able to write files?
tibberous is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 19th, 2008, 11:50 AM   #2 (permalink)
URB4N 5K1LLZ
Super #1
 
Roxy's Avatar
 
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,648 posts
Gave thanks: 81
Thanked 127 times
Have you gone into your Cpanel and checked on the Perl Modules feature? I've never worked with CGI/Perl scripts before, so I'm not 100% sure, but from looking over it on Cpanel, it looks like it could help you. =)
__________________
Roxanne
Surpass Staff

Urban Roxy -Personal Blog
SH63 - the best darn shared server!
Roxy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 19th, 2008, 12:20 PM   #3 (permalink)
Surpass Developer
On a golden path...
 
Mark's Avatar
 
Joined in Jan 2004
Lives in Florida
Hosted on decc.surpasshosting.com
399 posts
Gave thanks: 10
Thanked 68 times
Your perl script should be 755. The directory you are trying to write to should also be 755 because it will be run in suexec mode. Which means it will run as your username instead of the default "nobody" user. If the permissions are 777, its not going to run at all. You may wish to also check the Error Log in cPanel, which will log any system errors your script generates
__________________
Mark
Surpass Hosting Developer
sɹnoʎ uɐɥʇ ɹǝʇʇǝq sı bıs ʎɯ
Mark is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On