wget for 1 user to download video files gets access denied.

jonn

Verified User
Joined
Mar 29, 2009
Messages
112
Location
Queensland, Australia.
I need to have access to the server utility "wget", which will be used to download thumbnails and video files for a video sharing site.
Just dont know how? to enable it for the user.:confused:
 
how would I just allow one user to access wget.

I read up everywhere its unsafe to allow everyone to access wget, and it is possible to allow specific users to access it, by doing some method.

should I copy
cp the binary wget to the home directory of the user. and chmod it something for that user to access only.
just a thought, but I remember 10 years ago one host did open wget for my search engine, but he doesnt work there anymore, so Im not sure.
 
That looks about right chmod o+x /usr/bin/wget
http://www.tech-recipes.com/rx/691/set-unix-file-access-permissions-with-chmod/
damn I dont like getting confused. I feel old.

Has anyone tried to allow only specific users to access wget by copying the wget to the home directory of the user that needs it.
Like:
cp /usr/bin/wget /home/username/domains/videosite.xxx/

Or is there a better way. Maybe this can be in tutorials Im sure lots of directadmin users will get this asked from there users at some stage. Videosites are popping up all the time.

thanks.
 
Last edited:
You feel old? I felt old in the 40s, when that icon photo was taken :D.

If you move wget to a user directory don't forget to set the execute bit for the user, and don't forget to tell the user to use the entire path to his/her version of wget.

There is a better way but it gets complex. You can create a new group, set the group ownership of wget to that group, add specific users, whom you wish to allow wget access, to that group.

Jeff
 
can you or some other experienced administrator make a run down on how to add such trick.

-create a new group
-set the group ownership of wget to that group
-add specific users
-if any user hosting account changes

tutorial if possible. of course if you want to. please.. :)
 
My main business is fixing servers. I get a lot of new clients after people break their systems.

So feel free to move on :).

A line-by-line set of instructions? I don't do that, because if you make a mistake you'll blame me, and you'll never know why it happened.

You can always learn to read the man files. If you're running a server and you don't have one at home you can play with (not DirectAdmin, but at least linux/unix), you're probably never going to learn enough to be a safe administrator.

That said:
-create a new group
Code:
# addgroup groupname
-set the group ownership of wget to that group
Code:
# chgrp wget groupname
-add specific users
This gets a bit more complex.

Edit the file /etc/group. The group you've just added should be at the bottom, looking something like this:
Code:
groupname:x:5555:
Where the 5555 can be any number. The number doesn't matter. Leave it alone.

After the number there'll be a colon character (:). After the colon character put in the name of the first user to add to the group. When you add more users, be sure to put a comma between users but not at the end.

When you're done it could look something like this:
Code:
groupname:x:1043:jeff
or
Code:
groupname:x:1043:jeff,joe

Nothing to restart.

However: You're editing a file which could change if a user is added to the system (many OS distributions, including RedHat and CentOS add a new group for each user). And if that happens while you're editing the file you'll overwrite the new group when you save the file.

Some OS distributions have a special editor that know how to handle editing files such as passwd and group; use one if your OS has it. If not, then change the filename, then edit it, then after you save it, change the name back. This means if anyone tries to add a user while you've got the file open for editing, the system won't let the user be created. But that's better than breaking the file.
-if any user hosting account changes
if any user hosting account changes, what? Change the group file? That's a job for a good script programmer.

Jeff
 
Thanks mate, that’s fine, gives me something perhaps to cross-reference at least.
Mate, I’m not the type to blame others for my actions, no worries.
My server, my risk Right!
But your ok in warning, some people do take it personal.
So thank you for your thoughts of this subject. Very appreciated
 
Back
Top