icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Shared Hosting » /bin/sh: /usr/bin/wget: Permission denied

Shared Hosting Questions about your shared hosting account.

Reply
 
LinkBack Thread Tools Search this Thread
Old September 10th, 2006, 6:10 PM   #1 (permalink)
Registered User
Comfy Contributor
 
felguard's Avatar
 
Joined in Jun 2006
153 posts
Gave thanks: 12
Thanked 0 times
/bin/sh: /usr/bin/wget: Permission denied

I'm trying to use the Cron Jobs but I'm getting the error message sent to me in my E-Mail:

/bin/sh: /usr/bin/wget: Permission denied

This is the command I'm running:

Quote:
wget -q http://****/****/****.php> /dev/null
Where the **** is my path to the file.

I've tried using the command php -q, GET, and wget -O /dev/null.

Any suggestions?
__________________
This is Sparta!

Spartans! Ah-hu!

Last edited by felguard; September 10th, 2006 at 6:11 PM.
felguard is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 10th, 2006, 6:24 PM   #2 (permalink)
Registered User
Comfy Contributor
 
meephead's Avatar
 
Joined in Aug 2006
Hosted on SH103
100 posts
Gave thanks: 2
Thanked 4 times
Wget is not allowed to all users by default, although if you ask through the help desk you might be able to get access to it.
__________________
[SH103]
http://nemesia.org/
meephead is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 11th, 2006, 4:23 AM   #3 (permalink)
Registered User
Comfy Contributor
 
felguard's Avatar
 
Joined in Jun 2006
153 posts
Gave thanks: 12
Thanked 0 times
Oh I see, kind of had a feeling it would be like that. Thank you for your help.
__________________
This is Sparta!

Spartans! Ah-hu!
felguard is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 11th, 2006, 4:57 AM   #4 (permalink)
Registered User
Comfy Contributor
 
felguard's Avatar
 
Joined in Jun 2006
153 posts
Gave thanks: 12
Thanked 0 times
Okay, on my way to submitting a ticket in the support division, it ask for my hosting's username and password. Is this the information for my cpanel account? Do they usually ask this? Just wondering.
__________________
This is Sparta!

Spartans! Ah-hu!
felguard is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 11th, 2006, 8:07 AM   #5 (permalink)
01101100
Super #1
 
markscns's Avatar
 
Joined in Jan 2006
Lives in West Michigan
Hosted on SH92
1,602 posts
Gave thanks: 49
Thanked 112 times
Or else create a PHP file that uses fopen like this:

<?php
$fp = fopen("http://www.domain.net", "r");

?>

And then use the curl in the cron job to call that PHP script. It should do the same thing you need to do.
markscns is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 11th, 2006, 10:19 AM   #6 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,033 posts
Gave thanks: 48
Thanked 129 times
Wouldn't he want to... I don't know... write the file too?

In which case I think a combination of file_get_contents() and file_put_contents() might be less code and easier? Just throwing that out there cause I've only used WGET for downloading a file to store it or work with it on the filesystem.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 11th, 2006, 12:26 PM   #7 (permalink)
Registered User
Comfy Contributor
 
meephead's Avatar
 
Joined in Aug 2006
Hosted on SH103
100 posts
Gave thanks: 2
Thanked 4 times
I'd assume it depends on what he wants to do. For example, I'd rather not use file_*_contents() for running a mirror of an archive that's like 5gb, which is what I'm doing with wget right now. You'd probably have to write some code to compare the modified dates on the files to save yourself the trouble of doing pointless tasks (getting the entire archive of files over again even though there were only a few modified files). Also, if they were large files I'm assuming that method would be really overkill.

In my opinion certain things are just better left to wget, and I'd recommend asking for it if it's one of those things.

BTW, while on the topic, does anyone know why it's not simply allowed by default? I'm just curious since I don't really see any security risks involved in allowing it as long you know what you're getting.
__________________
[SH103]
http://nemesia.org/
meephead is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 11th, 2006, 12:29 PM   #8 (permalink)
Insanely
Super #1
 
Skipdawg's Avatar
 
Joined in Jul 2005
Lives in Northwest USA
4,154 posts
Gave thanks: 39
Thanked 78 times
If wget is at all resource intensive that may be why it is disabled by default on shared and reseller servers. Not sure I've never used it.
__________________
Skipdawg is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 11th, 2006, 2:26 PM   #9 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,033 posts
Gave thanks: 48
Thanked 129 times
Quote:
Originally Posted by meephead View Post
I'd assume it depends on what he wants to do. For example, I'd rather not use file_*_contents() for running a mirror of an archive that's like 5gb, which is what I'm doing with wget right now. You'd probably have to write some code to compare the modified dates on the files to save yourself the trouble of doing pointless tasks (getting the entire archive of files over again even though there were only a few modified files). Also, if they were large files I'm assuming that method would be really overkill.

In my opinion certain things are just better left to wget, and I'd recommend asking for it if it's one of those things.

BTW, while on the topic, does anyone know why it's not simply allowed by default? I'm just curious since I don't really see any security risks involved in allowing it as long you know what you're getting.
Fully agree with that. I'd never use PHP to handle the transfer of a large file. But as an alternative to using fopen... I'd use file_get_contents as it's more suited to opening a complete file rather than stepping through.

In my opinion, I'd rather people use WGET for retrieving files and disable allow_url_fopen. I'd imagine resource wise they're about the same... but it would cut back on exploits and flaws which use it to inject remote code.
H 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

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