View Single Post
  #6 (permalink)  
Old December 16th, 2003
nDiScReEt's Avatar
nDiScReEt nDiScReEt is offline
_eLeCtRiFyInG MeMbRr_
 
Join Date: May 9th, 2002
Location: Chicago
Posts: 232
nDiScReEt is flying high
Default Not A Goofy Problem...

It is a newbie problem. I will explain.
Linux is a secure operating system with read and write access dictated based on user and groups access rights. Java is a object-oriented programming language that consists of applets and classes. Applets are java programs ran through a web page using an internet browser while a class is ran from command line. Java was created to allow for advanced functionality through the internet without sacrificing security. Two things java and linux have in common is security. Now, Java can do no more then what you allow it to do on your system. It can not change access rights, or anything that you haven't given it permission to do. The reason it can write as the user invoking the program under only the user's directory is because that user has full read and write access to that directory. If you want any user to write to Limewire's installed directory, you will have to change the access rights to limewire's directory and any shared folder's that you want to share and modify. Example:

user=noob
home directory for noob=/home/noob
LimeWire installed directory=/home/noob/LimeWire
LimeWire default shared directory=/home/noob/LimeWire/Shared

$ ls -l /home/noob

dxrw xrw xr- noob users LimeWire

The limewire installation in this case was installed by user "noob" whom is part of group "users". In the case of this installation it is a safe assumption that all users created on this system will be added to group "users". Based off this valid and very important piece of information, we are able to set the access rights to limewire for all users, since we installed limewire as root or another user.

Let us say we moved LimeWire to a default (shared) directory for all users to use (/opt/shared/LimeWire). Example:

$ su root
$ password:
# mv /home/noob/LimeWire /opt/shared/

# ls -l /opt/shared

dxrw xrw xr- root root LimeWire

The access to read and write is expressly given to the user and group root only. We will have to change that.

# chown -R noob.users /opt/shared/LimeWire

# ls -l /opt/shared

dxrw xrw xr- noob users LimeWire

I changed the user rights to noob as I am never comfortable with a program running with privileged root access and it is highly unneccessary.

Since I know Mandrake and Red Hat creates a special group that reflects the exact name of the user. Example:

# ls /home/noob

dxrw xrw xr- noob noob LimeWire

You will have to create a group and add all your users to it and give it group access rights to LimeWire's directory and shared directories where ever you specificied and/or moved them. Example:

# groupadd users

Next you will have to add users to group "users" but first you will have to know what all groups user noob is a member. Example:

# groups noob

noob audio video wheel portage

noob is not part of our newly created
"users" group. We will have to add noob. Example:

# usermod -G noob,audio,video,wheel,portage,users noob

*Note* There should be no spaces between the names of each group. There is a space after the last group entry and before the name of the user that we are modifying *End Note*

Do this for each user on your system that you would like to have access to your limewire installation, shared directories, and files.

HTH

P.S. Do not type "$" or "#" as those are normally the characters you will see in a bash shell prompt.
altoine

P.P.S. You more than likely will have to run the chown command again if you specified the "users" group before it existed.

P.P.P.S. You can change "users" to any unique group name that doesn't already exist on your system.

Last edited by nDiScReEt; December 16th, 2003 at 04:01 PM.
Reply With Quote