[techtalk] How do I ... ? (share directories) (make Eterm themes work)
mary at creative.net.au
Thu Nov 16 06:57:27 EST 2000
On Wed, Nov 15, 2000 at 11:28:31AM -0600, J-Mag Guthrie wrote:
> Issue 1: I am on a LAN. I want to set up, on my multi-gig HD, a shared
> place for everyone to put their .mp3 files.
> I expect there are two parts to this -- what I do on my box to share the
> stuff and what other folks' do on their boxen so they can mount the shared
> stuff. I am running smbd (because we share the printer) but I have no
> clue how it was set up (by someone who is not available).
This response is quite detailed - apologies if you know an assortment of
this stuff already. And I'm not even answering all of it :)
The first part is creating a place that all users can write to and read
The place is totally up to you. We do this exact thing at work and have
created a /mp3 directory.
Then you need to set the permissions so that all users can
read/write. This means finding a group that all the users are in, or
creating one. (Use the command 'id [user]' liberally and look at
/etc/group .) Since Debian's default behaviour is to have a user in a
group with their name, you'll probably have to make one. Call it the mp3
Use the command 'groupadd [name]' to add a new group.
The entry in /etc/group would look like:
Manually adding usernames works, but people will have to relogin/remount
samba shares to get the permissions. Also keep in mind that every time you
add a new user you (or something automated) needs to add their name to
Now you need to change the group ownership of the directory using 'chown
.[groupname] [directoryname]' and modify the group permissions so that
the group can read and write.
I have written an FAQ for a uni message board which is basically a guide
to having a UNIX account on that system - the section on file permissions
is universally relevant (feel free to critise everyone :) ) - see
Now as samba there are two options:
1) The cheat option. Create a symbolic link in everyone's home directory
to the mp3 directory 'ln -s [mp3directory] ~[user]/mp3'. Again this is
something that has to be added for all new users. Provided their whole
home directory is shared, this will appear in their samba share. I
*believe* - have nowhere to test - that samba follows symlinks.
2) Edit the samba config to make mp3 a share. I don't know much about
samba so someone else will have to field that.
Note that there are of course security issues with this, as with allowing
users to do anything. There's quite a simple attack on the system which
can be done, deliberately or not, by filling up an important partition so
that the system suddenly can't read or write to it anymore. If you have
separate partitions on the drive, put the mp3 directory on a non-system
partition - /home is an example (that way people will not be able to write
to their home directory and will be inspired to delete some mp3s').
Also the setup described above lets people delete other people's mp3s. If
you don't want this to happen, you'll have to do something like our work
1) Create a separate mp3 directory.
2) Let each user have their own mp3 directory, user writable, group
3) Have symlinks to all the user mp3 directories from the main mp3
4) Create a samba mp3 share to the main mp3 directory.
Anyway if you do want to RTM, an assortment of commands needed to do the
above described (and all have man pages):
mkdir, groupadd, usermod (another way to change user's group membership -
careful it can nuke their existing memberships), chmod, ln
More information about the Techtalk