LinuxMCE Forums

General => Users => Topic started by: geekyhawkes on June 27, 2009, 03:25:40 pm

Title: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: geekyhawkes on June 27, 2009, 03:25:40 pm
EDIT **** If your searching and find this check the last post for a possible solution if the fault below matches your issue***


Just when i think i am starting to understand some of MCE's setup i find something else to trip my stupid self up!

I am trying to drag some music off of my ubuntu laptop directly onto my media drive in MCE.  

I have connected my laptop to MCE and then have edited /etc/fstab to read the following;

//192.168.80.1/Storage53$ /media/mce smbfs cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

The drive mounts ok and i can view the files currently on my mce media drive.  The problem i have is when i try and copy / paste music accross i get an error saying i do not have permission to write to that folder.  

My smbcredentials file contains my username and root password for mce.

Can someone give me some help please?
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: merkur2k on June 27, 2009, 04:19:06 pm
Use your LinuxMCE user account info (same one you use to connect to web admin) and use the 'public' (or 'home') share rather than one of the drive shares.
Better yet, use nfs: 'mount 192.168.80.1:/home /media/mce' (as root, and make sure nfs-common package is installed)
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: geekyhawkes on June 27, 2009, 04:56:08 pm
I need to use the drive share as i have 2 hard drives in my machine and am trying to keep all of the "media" on the second (larger) drive.  My intent is then to keep the 250gb HDD for the OS and VDR use, seems a cleaner way of sorting media to me.

As far as account details I have set my smbcredentials file up with the details i use to log in to web admin / root account and still get the error.

Any other ideas how i can get read/write access on my second hard drive through the samba share?
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: merkur2k on June 27, 2009, 05:23:15 pm
I dont understand what the issue is, you have access to the individual drives in /home/...
And really, use nfs if its a linux machine, its sooo much faster than samba.
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: geekyhawkes on June 27, 2009, 06:04:15 pm
I have edited my fstab to read;

192.168.80.1:/home /media/mce nfs rw,hard,intr 0 0

It is defiantly quicker than smbf.  

I must be dumb as i cannot see how to get to my second hard drive from within Home..?

I am also still unable to create any folders etc in home/public/data/audio  from my ubuntu laptop so nfs hasnt solved the problem unless i have miss understood your directions (which is possible!)

Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: merkur2k on June 27, 2009, 07:47:01 pm
There are symlinks to any managed drives in audio, video, game, etc folders. for instance in my core:
Code: [Select]
root@dcerouter:/usr/pluto/bin# ls /home/public/data/audio/ -l
total 0
lrwxrwxrwx 1 root public 32 2009-06-23 13:30 Maxtor_6Y250P0 (sdb1)-CORE [27] -> /mnt/device/27/public/data/audio
lrwxrwxrwx 1 root public 32 2009-06-23 13:30 ST3500630AS (sdc1)-CORE [26] -> /mnt/device/26/public/data/audio
There should not be any permissions problems, as the exports file on the core has all uid squashing options enabled.
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: geekyhawkes on June 27, 2009, 08:59:46 pm
Sorry im new to sym links, can you explain your last post for a simpleton please? 

Sorry but what do i need to do?

(damn my stupidity!)
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: merkur2k on June 28, 2009, 01:21:14 am
Symlinks in unix are basically equivalent to shortcuts in windows (except better, as usual); its just a pointer to a resource elsewhere in the filesystem.
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: colinjones on June 28, 2009, 02:40:59 am
He's saying, just navigate down from /home into public, then data, then audio (say) and under there you will see your HDD folder as a share name... its actually a symlink, but it acts as if it is a directory and your HDD will look like it is mounted directly under /home/public/data/audio.... same for video etc...

and I think merkur2k is being extremely generous when he says that symlinks are equivalent to shortcuts!! actually they are the same as NTFS mount points/junctions, but almost nobody uses those because they are practically unmanageable and invisible!
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its sha
Post by: geekyhawkes on June 28, 2009, 04:50:53 pm
arr thanks for the explainations. for some reason i dont appear to have the symlinks your talkimg about. when i go home/public/data/audio on the mce harddrive i see an empty folder and no link to the media drives directory. is this a browsing issue on my laptop or are the links not there on 0810?

thanks
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: merkur2k on June 28, 2009, 05:32:53 pm
Yeah I actually checked that... since they are symbolic links they wont work (the client machine tries to resolve them locally). But if you dont even have any at all... well that would be a broken install. or you havent added any managed drives.
So i guess it would be back to using smb. or you can still use each drive directly since they each have an nfs export too (look in /etc/exports for configured nfs mount points).
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: geekyhawkes on June 28, 2009, 07:52:25 pm
Sorry, i should have been clearer, i was looking at the symblinks from my ubuntu laptop when i mounted the \home directory on the MCE machine.

So i guess back to the original question, why wont MCE let me write to the second hard drive \STORAGE53$ when i mount it with Smb and use my MCE root user name and login (as per the admin page). 

What am i missing? 

Can you give me a few more details about the nfs export solution?  Is it likely to help me get access to the second hard drive from my laptop?
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: merkur2k on June 28, 2009, 09:51:37 pm
If using samba, mount /home and go through it that way, samba will resolve the symlinks correctly. If you are having permissions issues, then i dont know what to tell you other than maybe the credentials file isnt working properly. Try to mount it manually feeding it credentials that way first.
If using nfs, then you can mount the drives directly.
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: colinjones on June 29, 2009, 12:27:08 am
I have to say, I remember getting a little trouble from credentials when I first did this from my XP machine to the SAMBA shares.... I can't remember what credentials I eventually used as it no longer prompts me and just goes straight in. The only thing I did is made sure my PC was in the LINUXMCE workgroup first and rebooted. That really should only have computer browser/name resolution implications, but.... once you get passed that you can browse through the symlinks without difficulty. I would check actually on the core itself, though, to reconfirm that the symlinks definitely exist locally as this is critical more generally...
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: geekyhawkes on July 04, 2009, 05:05:46 pm
Ok i am starting go round in circles with this issue.  I do not appear to have any symlinks in the /home/data/audio directory (or at least i dont see anything in KDE on my Hybrid machine in the audio folder).  The machine functions fine within MCE, all of media is available to all of the devices i have on the MCE network and is listed within the orbiters. 

Can i manually make these symlinks, or have i missed something somewhere in webadmin maybe when i added the extra hard drive?
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: colinjones on July 04, 2009, 05:15:32 pm
Again, never under any circumstances create symlinks unless you want to guarantee you kill your LMCE.

The path is actually /home/public/data/audio..etc and /home/user_#/data/audio..etc for public and private respectively.

If you have any network media appearing on your system, and you chose LMCE folder structure when asked, the symlinks are definitely there.... the system simply wouldn't work without them... look again!

If you chose not to use the LMCE folder structure then I have no idea where it puts them, I never use that mode, and you should perhaps consider doing the same, it is not "best practice"
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: geekyhawkes on July 04, 2009, 05:24:31 pm
Thanks for the full path i will give that a go.  I am using the MCE file structure in an attempt to follow best practise.  Can you confirm for me, should i see these symlinks as normal folders within Dolphin on KDE?  Currently the MCE OS harddrive /home/data/audio folder is empty.
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: colinjones on July 05, 2009, 12:09:53 am
You still have the path wrong in your last post.... but yes, you will see the symlinks in there, although from memory I think they may be grayed out if the drive isn't mounted at that point. Just click through them as normal and this will mount the drive and move into the next folder.

But for troubleshooting, please use a terminal and move through the directories using cd /path/path/etc and ls -al to show the contents
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: geekyhawkes on July 06, 2009, 12:53:15 pm
Right, being as detailed as i can here (paths etc) i have navigated to the following location under KDE desktop / terminal:

cd /
cd home/public/data/audio
ls -al returns the following

total 8
drwxrwsr-x 2 root public 4096 2009-06-07 15:30 (and one blue dot)
drwxrwsr-x 12 root public 4096 2009-07-06 12:07 (and 2 blue dots)

Is this what you would expect to see?
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: colinjones on July 06, 2009, 03:03:04 pm
IF you have network media shares providing content, AND IF they are set to use the LMCE folder structure, AND IF they are appearing in your Orbiter, then you WILL see the symlinks to those shares in that folder. There is no way that the Orbiter can find the media otherwise. This is also reflected in the Media Sync menu of the web admin. Check your web admin for the path as well....

I can understand that something may be wrong and the symlinks not there, however if that is the case, and the above conditions are satisfied, then the media cannot appear in the Orbiter as this is where it finds is! I think you haven't used LMCE folder structure.. check your web admin media sync....
Title: Re: What am i doing wrong with samba - MCE wont let me create folders on its shares
Post by: geekyhawkes on July 06, 2009, 06:59:21 pm
RIGHT:  I have adjusted the properties of my second hard drive in webadmin as (predicatbly from all of the help above) i had messed up adding it and not set it to use LMCE file structure.

For anyone else that finds themselves in this situation, the easy way to change a drives properites to use LMCE file structure is below:

Load webadmin:

Advanced -> Configuration ->Devices

On the left hand tree you should then be able to expand it until you find your second harddrive (probably labeled sdb1)

A click on that drive will enable the right hand admin pane of the drive to appear.  From here, if you scroll down until you see Device data

PK_users should be set to "Use LMCE'S directory structure" 

If not change it then hit save at the bottom.  This will create the symlinks talked about earlier in this topic

No to test if my samba shares are working correctly.