evanc2five;594691 Wrote: 
> Hi, I've recently upgraded to ubuntu 10.10
> I reinstalled 7.5.1 sbs and during the install stupidly did not specify
> my root password (i think thats what it was asking for). 
> As a result I seem to have the permissions issue when trying to browse
> for my music files (sbs group says 'nogroup' and mysql says 'mysql' for
> group name).
> 

That's normal.

> 
> The software can't browse further than my /home directory.
> I have tried uninstalling, but I never get asked for that password when
> reinstalling and believe the uninstall does't quite remove everything
> (as I still have /lib/squeezeboxserver directory and mysql directory).
> 
> I might try chmod to some music files, but I can't even browse into my
> own home folder, so theres no point?

Right, you're running up against usual Linux permissions.

On many systems /home/username is not readable by other users.  Think
of system where users are often people: you don't want 'fred' seeing
what is in in the directory for 'bob'.

Even more so, /home/username/Music would likely be more restricted.

There are solutions to this (there have to be: think of such a system
with users having web sites, in /home/username/public_html -- the web
server needs to be able to read thoee).

Every file and directory on Unix systems has three sets of permissions:
for the owner, others in the 'group' (think of group projects or
something where data should be shared) and 'other'.

The first step: SBS needs to be able to get to /home/username.  Let's
be a bit paranoid.  It doesn't need to read anything in that directory
at all.  It just needs to pass through it.  Since there are only 3
permissions (read, write, execute) for each of the three groups, and
neither read nor write is what you would really want... the otherwise
meaningless 'execute' permission is what you would want.  "executing" 
a directory means "can pass through this" not "can run this" since
running a directory makes no sense.

So "chmod o+x /home/username" is what you want.

Now, you have your music somewhere off there... we'll pretend it's
/home/username/Music for lack of a better guess.  This is a bit
different: you'll not only want to let SBS "pass through" this
directory, you'll also want it to be able to read the contents of it. 
(Ie, to list any directories included in it.)  So you'll need execute
-and- read permissions.  So "chmod o+rx /home/username/Music" is what
you would want.

And then one more step: /home/username/Music would probably contain a
bunch of directories, and each of those would contain a bunch of
files... all of those directories would need 'rx' permissions and the
files 'r'.  

Use this one: chmod -R o+rX /home/username/Music

And that should allow SBS to read all the files and pass through all
the directories.

Now, you don't want to do that every time you add music.  That would
... suck.

This is where what is called 'umask' steps in.  If you set the umask to
'022', then when you create new files, it will magically strip the
'write' permission from them for everyone but you... but leave the read
and execute alone.

If you're uploading via Samba (aka 'windows file sharing'), then it's
VERY slightly more complex: you need to edit /etc/samba/smb.conf to set
the default permissions.  But it's not all that hard.  (There is a
'create mask' and 'directory mask' there... and it's exactly like
umask.. except backwards... so 755 instead of 022.)


-- 
snarlydwarf
------------------------------------------------------------------------
snarlydwarf's Profile: http://forums.slimdevices.com/member.php?userid=1179
View this thread: http://forums.slimdevices.com/showthread.php?t=83894

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to