Author Topic: What am i doing wrong with samba - MCE wont let me create folders on its shares  (Read 6423 times)

geekyhawkes

  • Guru
  • ****
  • Posts: 230
    • View Profile
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?
« Last Edit: July 07, 2009, 06:59:41 pm by geekyhawkes »

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
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)
« Last Edit: June 27, 2009, 04:23:08 pm by merkur2k »

geekyhawkes

  • Guru
  • ****
  • Posts: 230
    • View Profile
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?

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
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.

geekyhawkes

  • Guru
  • ****
  • Posts: 230
    • View Profile
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!)

« Last Edit: June 27, 2009, 06:25:00 pm by geekyhawkes »

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
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.

geekyhawkes

  • Guru
  • ****
  • Posts: 230
    • View Profile
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!)

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
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.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
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!
« Last Edit: June 28, 2009, 02:43:09 am by colinjones »

geekyhawkes

  • Guru
  • ****
  • Posts: 230
    • View Profile
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

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
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).

geekyhawkes

  • Guru
  • ****
  • Posts: 230
    • View Profile
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?

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
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.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
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...

geekyhawkes

  • Guru
  • ****
  • Posts: 230
    • View Profile
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?