Problem with Samba using symlinks (openSUSE 12.1 (x86_64))

Hi guys,

Not sure when this problem started but I think it was when I upgraded to 12.1.

This is my current setup:

openSUSE 12.1 (x86_64)
smbd Version 3.6.3-34.12.1-2797-SUSE-SL12.1-x86_64

I have the following disk structure:

/u01 - physical disk
/u02 - physical disk

/u02/Unpack
/u02/Unpack2

/u01/server/Unpack symlink to /u02/Unpack
/u01/server/Unpack2 symlink to /u02/Unpack2

lrwxrwxrwx 1 hebjor users 12 Jul 12 01:22 /u01/server/Unpack -> /u02/Unpack/
lrwxrwxrwx 1 hebjor users 13 Jul 12 01:30 /u01/server/Unpack2 -> /u02/Unpack2/

drwxr-xr-x 427 hebjor users 57344 Jul 11 09:43 /u02/Unpack
drwxr-xr-x 3 hebjor users 18 Jul 12 01:29 /u02/Unpack2

I’m aware of the following settings needs to be used:

unix extensions = no
follow symlinks = yes
wide links = yes

This is my minimal smb.conf:

[global]
workgroup = WORKGROUP
passdb backend = tdbsam
unix extensions = no

[TEST]
comment = *** BIG *** Share
inherit acls = no
path = /u01/server
read only = No
follow symlinks = yes
wide links = yes

The weird part is Unpack works while I get permission denied with Unpack2. I really have no idea why? I tried to delete all symlinks and both Unpack and Unpack2 are created just the same way.

Anyone have any ideas what is wrong here?

Can we get three more lists of information from you? Open up a terminal session and type in these commands:

su -
password:

fdisk -l

df

cat /etc/fstab

Place the resulting data for the last three commands into a code # field each using the advanced message editor. It will look something like the commands given above, but larger of course.

In the mean time, here is interesting info to look at:

Samba S.W.A.T. - Samba Web Administration Tool Setup for openSUSE - Blogs - openSUSE Forums

SWAT - Samba Web Administration Tool - Setup & Creation Script - 1.03 - Blogs - openSUSE Forums

Thank You,

Thanks for your reply. I tried to installed a newer version of Samba via this repo (Index of /repositories/network:/samba:/STABLE/openSUSE_12.1), but same issue.

smbd -V


Version 3.6.6-114.1-2823-SUSE-SL12.1-x86_64

fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e2d86


   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63     4209029     2104483+  82  Linux swap / Solaris
/dev/sda2   *     4209030    46154744    20972857+  83  Linux
/dev/sda3        46154745   976768064   465306660   83  Linux


Disk /dev/sdb: 2000.4 GB, 2000396746752 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907024896 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008a108


   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  3907024895  1953511424    7  HPFS/NTFS/exFAT


Disk /dev/sdc: 27000.0 GB, 26999991042048 bytes
255 heads, 63 sectors/track, 3282561 cylinders, total 52734357504 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/sdc doesn't contain a valid partition table
Note: sector size is 4096 (not 512)


Disk /dev/sdd: 9000.0 GB, 8999998586880 bytes
255 heads, 63 sectors/track, 136773 cylinders, total 2197265280 sectors
Units = sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/sdd doesn't contain a valid partition table

df

Filesystem       1K-blocks        Used  Available Use% Mounted on
rootfs            20641788     8993284   10599864  46% /
devtmpfs           6155536          76    6155460   1% /dev
tmpfs              6163024          72    6162952   1% /dev/shm
tmpfs              6163024         736    6162288   1% /run
/dev/sda2         20641788     8993284   10599864  46% /
tmpfs              6163024           0    6163024   0% /sys/fs/cgroup
tmpfs              6163024           0    6163024   0% /media
tmpfs              6163024         736    6162288   1% /var/run
tmpfs              6163024         736    6162288   1% /var/lock
tmpfs              8388608      184484    8204124   3% /vtmp
/dev/sdd        8786974208  5801162768 2985811440  67% /u02
/dev/sdc       26367047680 25172489840 1194557840  96% /u01
/dev/sda3        457990512   318007008  116718172  74% /home

cat /etc/fstab

/dev/disk/by-id/ata-SAMSUNG_HD501LJ_S0MUJ1CP305244-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-SAMSUNG_HD501LJ_S0MUJ1CP305244-part2 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-SAMSUNG_HD501LJ_S0MUJ1CP305244-part3 /home                ext4       acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
tmpfs                /vtmp                tmpfs      size=8g              0 0
/dev/sdc             /u01                 xfs        noatime,nodiratime,allocsize=512m    0 0
/dev/sdd             /u02                 xfs        noatime,nodiratime,allocsize=512m    0 0

Thanks for the info hebjor. Off hand I don’t see the folder names you are trying to use which means you are trying to map a Samba share from another PC to your local PC, right? Its early morning here in Austin and I will look at this in more detail tonight when I have more time. Make sure to post where the folder is being shared from and from what PC to which PC. Since Samba requires two computers, its helpful to know about both PC’s and their setup.

Thank You,

Yeah, I try to map these from my Windows 7 clients. I also verify the issue by using smbclient from Linux, and I get the same issue from both clients.

When I map from Windows 7 i use the following path \192.168.100\TEST which maps up /u01/server.

On /u01/server I have a symbolic link to a directory on another disk (/u02/Unpack) which works just fine, but the strange thing is any other directory on /u02 does not work. I’ve created an identical new directory (permissions) called /u02/Unpack2 and a similar symlink from /u01 to this folder but it just does not work. I can only get the Unpack symlink to work, any other symlink just gives me the permission denied error message. I’ve tried to run with different debug levels but so far I have not been able to understand why this happens.

I’m tempted to perform a similar test in VMware using Ubuntu (or even OpenSuse) since this is so weird.

Sorry for my (maybe) confusing try to explain this problem, and thank you for taking time to help me :slight_smile:

On 2012-07-12 02:16, hebjor wrote:

> The weird part is Unpack works while I get permission denied with
> Unpack2. I really have no idea why? I tried to delete all symlinks and
> both Unpack and Unpack2 are created just the same way.

Could you please show this with commands? Try a sample file create with
touch on both places, then “ls -l” and post all that inside code tags. I’m
not fully understanding the problem, perhaps with that I can see. Do it in
Linux for the moment; if the problem is via samba only, import the shares
to Linux as well and try there. If Ok, then in Windows.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

My ident is hebjor


hebjor@FS:/u01/server> id
uid=1000(hebjor) gid=100(users) groups=100(users),33(video)

Here are the symlinks on /u01


hebjor@FS:/u01/server> ls -ld Unpack*
lrwxrwxrwx 1 hebjor users 12 Jul 12 01:22 Unpack -> /u02/Unpack/
lrwxrwxrwx 1 hebjor users 13 Jul 12 01:30 Unpack2 -> /u02/Unpack2/

Here are the actual directories on /u02 that the symlinks point to


hebjor@FS:/u01/server> ls -ld /u02/Unpack*

drwxr-xr-x 433 hebjor users 57344 Jul 12 12:44 /u02/Unpack
drwxr-xr-x   3 hebjor users    18 Jul 12 01:29 /u02/Unpack2

Just to verify there is not a permission problem within Linux I create 2 identical files in the 2 directories


hebjor@FS:/u01/server> touch /u02/Unpack/TESTTEST

hebjor@FS:/u01/server> touch /u02/Unpack2/TESTTEST

Here are the files created


hebjor@FS:/u01/server> ls -l /u02/Unpack*/TESTTEST

-rw-r--r-- 1 hebjor users 0 Jul 12 20:00 /u02/Unpack2/TESTTEST
-rw-r--r-- 1 hebjor users 0 Jul 12 20:00 /u02/Unpack/TESTTEST

I use smbclient to test the share, and try to list the file I just created. As you can see I can see the file in directory Unpack but I get permission denied for the file in Unpack2. I cannot see the difference between those 2 symlinks and files, so I find this very strange.


hebjor@FS:/u01/server> smbclient -U hebjor //192.168.0.100/TEST

Enter hebjor's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.6-114.1-2823-SUSE-SL12.1-x86_64]
smb: \> dir Unpack*
  Unpack                              D        0  Thu Jul 12 20:00:33 2012
  Unpack2                             D        0  Thu Jul 12 20:00:36 2012


                65535 blocks of size 33553920. 36455 blocks available


smb: \> dir Unpack/TESTTEST
  TESTTEST                                     0  Thu Jul 12 20:00:33 2012


                65535 blocks of size 33553920. 36455 blocks available
smb: \> dir Unpack2/TESTTEST
NT_STATUS_ACCESS_DENIED listing \Unpack2\TESTTEST

Any ideas what I do wrong? Or if this is a bug? I did not have this issue before and I think it started after a the upgrade to 12.1, but not 100% sure.

I did a quick test and installed Ubuntu 12.04 on another disk and used the bundled smbd v3.6.3 with the same config and the problem was gone. Not sure what’s up with the OpenSuse installation. At least I have confirmed the config files and the huge xfs file systems are not the problem.

There are several services that must be running like nmb and smb you might want to verify in openSUSE. My Samba Links tells you how to get those service working and so perhaps they are not?

Thank You,

Both nmb and smb services are running. I had a look at your links and did not find anything wrong with my setup. Since the exact same config worked before (on previous OpenSuse version) and also works on a plain Ubuntu 12.04 x64 install my guess is this is some kind of bug. My setup is maybe not so common when the file systems are 27 and 9Tb and I use xfs.

Anyways I will stick to Ubuntu for a while and look in to the OpenSuse issue at an later date.

Thanks for your help guys!