Bug 1288227 - samba gluster vfs - client can't follow symlinks
Summary: samba gluster vfs - client can't follow symlinks
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: GlusterFS
Classification: Community
Component: gluster-smb
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-03 22:11 UTC by Steve D
Modified: 2019-08-12 12:59 UTC (History)
7 users (show)

Fixed In Version: glusterfs-6.x
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-09 10:00:20 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Steve D 2015-12-03 22:11:12 UTC
Description of problem:
Samba clients can't always follow symlinks on gluster vfs share. I've tried symlinks within the gluster volume directory tree as well as symlinks to different file systems. (see Steps to Reproduce)


Version-Release number of selected component (if applicable):
Samba Server:
OS = Centos 7.1
# rpm -qa | egrep -i 'gluster|samba'
samba-4.1.12-24.el7_1.x86_64
glusterfs-cli-3.6.7-1.el7.x86_64
samba-common-4.1.12-24.el7_1.x86_64
glusterfs-3.6.7-1.el7.x86_64
glusterfs-fuse-3.6.7-1.el7.x86_64
samba-libs-4.1.12-24.el7_1.x86_64
samba-winbind-4.1.12-24.el7_1.x86_64
glusterfs-api-3.6.7-1.el7.x86_64
samba-vfs-glusterfs-4.1.12-24.el7_1.x86_64
samba-winbind-modules-4.1.12-24.el7_1.x86_64
glusterfs-libs-3.6.7-1.el7.x86_64
samba-winbind-clients-4.1.12-24.el7_1.x86_64

Gluster Server(s):
samba-4.1.12-24.el7_1.x86_64
glusterfs-cli-3.6.7-1.el7.x86_64
samba-common-4.1.12-24.el7_1.x86_64
glusterfs-3.6.7-1.el7.x86_64
glusterfs-fuse-3.6.7-1.el7.x86_64
samba-libs-4.1.12-24.el7_1.x86_64
samba-winbind-4.1.12-24.el7_1.x86_64
glusterfs-api-3.6.7-1.el7.x86_64
samba-vfs-glusterfs-4.1.12-24.el7_1.x86_64
samba-winbind-modules-4.1.12-24.el7_1.x86_64
glusterfs-libs-3.6.7-1.el7.x86_64
samba-winbind-clients-4.1.12-24.el7_1.x86_64



How reproducible:
Always

Steps to Reproduce:
1. Configure samba to use gluster vfs:

[home]
comment = exporting gluster filesystem via gfapi
path = /home/
write list = +users
force group = users
read only = No
create mask = 0660
force directory mode = 0770
kernel share modes = No
vfs objects = glusterfs
glusterfs:loglevel = 7
glusterfs:logfile = /var/log/samba/glusterfs-test.%M.log
glusterfs:volume = storage
glusterfs:volfile_server = 10.0.231.50

2. Configure samba to allow symlinks (globally for testing)
[global]
workgroup = DOMAIN
realm = DOMAIN.CA
server string = Samba Server Version %v
security = ADS
dedicated keytab file = /etc/krb5.keytab
log file = /var/log/samba/log.%m
max log size = 50
unix extensions = No
load printers = No
printcap name = /dev/null
disable spoolss = Yes
template homedir = /home/%U
template shell = /bin/bash
winbind use default domain = Yes
winbind refresh tickets = Yes
winbind offline logon = Yes
idmap config DOMAIN:range = 4000-300000
idmap config DOMAIN:schema_mode = rfc2307
idmap config DOMAIN:backend = ad
idmap config * : range = 1000-2000
idmap config * : backend = tdb
hosts allow = 127., <>.<>.194.96/27, <>.<>.230.32/27, 10.0.231.0/24
printing = bsd
cups options = raw
print command = lpr -r -P'%p' %s
lpq command = lpq -P'%p'
lprm command = lprm -P'%p' %j
wide links = Yes


Actual results:
From a Windows client ALL symlinks appear to be files without extensions.

On Linux client the symlinks show as proper files/directories only
when the symlinks are to a location on the gluster volume. If
the symlinks are to a different file system samba client lists
nothing.

I've tested a non-VFS share [test] (see Additional Info) and symlinks are working ok.

Expected results:
At the minimum I would expect both Windows and Linux clients to be able to follow symlinks which point to locations within the gluster volume's directory tree.

Ideally Windows and Linux clients would also be able to follow symlinks to other filesystems mounted on samba server, but I can guess using vfs might limit this option.

Additional Info:

Tested with another samba share which symlinks are working properly to different filesystem locations.

[test]
path = /mnt/test/
write list = +users
force group = users
read only = No
create mask = 0660
force directory mode = 0770

Contains symlink to an nfs mount.

Comment 1 rjoseph 2016-08-23 12:56:10 UTC
GlusterFS-3.6 is nearing its End-Of-Life, only important security bugs still make a chance on getting fixed. Moving this to the mainline 'version'

Comment 2 Amar Tumballi 2019-05-09 10:00:20 UTC
Please try with glusterfs-6.x and reopen this if it is still happening. We have not seen this bug in a while now.

Comment 3 joao.bauto 2019-08-12 12:59:00 UTC
I'm seeing the same behaviour as Steve in glusterfs 6.4 and samba 4.9.11.

Testing with vfs glusterfs (gfapi), symlinks show up as files without extension on Windows and not showing at all in Linux. Switching to vfs glusterfs_fuse (fuse) both Windows and Linux show symlinks as folders and can follow them.

smb.conf 

clustering = yes
allow insecure wide links = yes
follow symlinks = yes
wide links = yes
unix extensions = no

[demo]
vfs objects = glusterfs 
glusterfs:volume = data
create mode = 0640
directory mode = 0750
glusterfs:logfile = /var/log/samba/glusterfs.log
path = /demo

[demo2]
vfs objects = glusterfs_fuse
create mode = 0640
directory mode = 0750
glusterfs:logfile = /var/log/samba/glusterfs_fuse.log
path = /mnt/data/demo2


Note You need to log in before you can comment on or make changes to this bug.