Koozali.org: home of the SME Server

[SOLVED] Symlink-to-Ibay Help Needed

Offline wbell

  • ***
  • 49
  • +0/-0
[SOLVED] Symlink-to-Ibay Help Needed
« on: January 09, 2013, 10:55:43 PM »
In previous versions of SME Server, I've used a symlink to allow a user access to an Ibay.
For some reason, in SME Server v8.0, when I create this same symlink and try to access the directory from the logged in user, I receive an Access Denied error.
My permissions all appear to be the same as on my other SME Servers, and the other servers work.
Any help would be appreciated!

NOTE: On Windows, the user has a mapped drive to his home directory.  On OSX, the user mounts the his home directory.  Both receive Access Denied errors.

 :(
« Last Edit: January 14, 2013, 05:37:23 PM by wbell »

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Symlink-to-Ibay Help Needed
« Reply #1 on: January 09, 2013, 11:00:35 PM »
Quote
In previous versions of SME Server, I've used a symlink to allow a user access to an Ibay.

please define, remembering that we can't see your monitor nor read your mind :-)

thank you

Offline wbell

  • ***
  • 49
  • +0/-0
Re: Symlink-to-Ibay Help Needed
« Reply #2 on: January 10, 2013, 04:59:32 AM »
To be more specific... On one of my current SME Servers (v7.51), I have an Ibay "classfiles" that has Write=Group Read=Everyone perms.
In a standard user's home folder, I created a symlink called "classfiles" that points to "/home/e-smith/files/ibays/classfiles/files/".
The user is then able to log into their home folder and see the folder/link "classfiles" and is able to navigate to it and see, view, and open it's contents.
On SME8, I have been unable to do this.  The user sees the folder/link, but when they try to access it, it gives an Access Denied error.
« Last Edit: January 10, 2013, 05:01:04 AM by wbell »

Offline mmccarn

  • *
  • 2,657
  • +10/-0
Re: Symlink-to-Ibay Help Needed
« Reply #3 on: January 12, 2013, 05:19:39 AM »
Samba in SME8 does not support symlinks, or "wide links" as they are called in the samba config.

Here's the middle of another post about this:
http://forums.contribs.org/index.php/topic,48258.msg239330.html#msg239330

CharlieBrady recommends using "mount --bind" instead of creating symlinks

Offline wbell

  • ***
  • 49
  • +0/-0
Re: Symlink-to-Ibay Help Needed
« Reply #4 on: January 14, 2013, 05:22:25 PM »
Thanks, mmccarn, for pointing me in the right direction!


**WARNING/DISCLAIMER**
The manual configuration described below will re-enable following symlinks in Samba for SME Server v8.x.
BUT... It will possibly leave your server open to an exploit discovered in February 2010.
As mentioned above, CharlieBrady recommends using "mount --bind" instead of symlinks.



If you are aware of the above disclaimer, but wish to still have the symlink feature, the steps below will allow you to re-enable this feature on SME Server v8.x.


#****************************************
#
#        How To Re-Enable Symlinks In Samba
#         Written For Use On SME Server v8.x
#
#****************************************



#  Create The "smb.conf" Custom Template Directory
#
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/smb.conf

#  Copy The Current "smb.conf/10globals" Template File To The Custom Template Directory
#
Code: [Select]
cp /etc/e-smith/templates/etc/smb.conf/10globals /etc/e-smith/templates-custom/etc/smb.conf/

#  Edit The "smb.conf/10globals" Custom Template File
#
Code: [Select]
nano -w /etc/e-smith/templates-custom/etc/smb.conf/10globals

#  Add The Following Code, Below "[global]"
#
Code: [Select]
follow symlinks = yes
wide links = yes
unix extensions = no  ## This may already be set.


#  Save & Close The "smb.conf/10globals" Custom Template File.
#


#  Expand The "smb.conf" Template
#
Code: [Select]
expand-template /etc/smb.conf

#  Restart The Samba Service
#
Code: [Select]
service smb restart
« Last Edit: January 14, 2013, 08:31:31 PM by wbell »

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: [SOLVED] Symlink-to-Ibay Help Needed
« Reply #5 on: January 14, 2013, 06:58:25 PM »
#  Copy The Current "smb.conf/10globals" Template File To The Custom Template Directory
#
Code: [Select]
cp /etc/e-smith/templates/etc/smb.conf/10globals /etc/e-smith/templates-custom/etc/smb.conf/

the copy will fail if /etc/e-smith/templates-custom/etc/smb.conf does not exist

then, prior to copy, you should create it with:
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/smb.conf

Offline wbell

  • ***
  • 49
  • +0/-0
Re: [SOLVED] Symlink-to-Ibay Help Needed
« Reply #6 on: January 14, 2013, 08:33:38 PM »
the copy will fail if /etc/e-smith/templates-custom/etc/smb.conf does not exist
...

Thank you, Stefano!
I have corrected my post.  8-)