Modify

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#1243 closed bug (fixed)

Wide links = no breaks Media share

Reported by: tman <mihaly.reg@…> Owned by:
Priority: normal Milestone: Firmware 2.3.7.1
Component: fon-base-firmware Version: 2.3.7.0 (Paco)
Severity: normal
Cc: Hardware: 2.0n (FON2300)

Description

Upgrade from 2.3.7.0 beta3 to Paco final. File sharing was already activated in beta and worked, with disc named Disc-A1. After upgrade I have renamed Disc-A1 to 'Files' (suggestion in another ticket) And I have this behavior accessing from win xp:
192.168.0.2\Files works fine
192.168.0.2\Media is ok, but then
192.168.0.2\Media\Files give this error: ...not accessible....access denied (see screen capture)

Attachments (3)

fonera_2013-01-03_161851.jpg (28.2 KB) - added by tman <mihaly.reg@…> 5 years ago.
samba (392 bytes) - added by tman <mihaly.reg@…> 5 years ago.
/etc/config/samba
_screencapture_and_log_20130103_162828.zip (122.9 KB) - added by tman <mihaly.reg@…> 5 years ago.

Download all attachments as: .zip

Change History (13)

Changed 5 years ago by tman <mihaly.reg@…>

Changed 5 years ago by tman <mihaly.reg@…>

/etc/config/samba

comment:1 Changed 5 years ago by tman <mihaly.reg@…>

An interesting observation: both sda1 and sbd1 mounts exist on fonera, sda1 with a FoneraApps? folder, and sdb1 with all the folders of the real disc. See the log attached and screencaptures.

Changed 5 years ago by tman <mihaly.reg@…>

comment:2 Changed 5 years ago by matthijs

  • Status changed from new to infoneeded

Is this access denied message also occurring when the USB disk is still mounted normally (e.g., before the disconnect thing shown in your last zipfile)?

For me, I can mount the Media share as expected, without any error. However, the Media share turns out to be empty, due to a recent change in symlink handling (#1049), which has the side effect of hiding all disks from the Media share...

comment:3 Changed 5 years ago by tman <mihaly.reg@…>

Yes, the same error after a fresh reboot, when disc is still sda1.

comment:4 Changed 5 years ago by matthijs

  • Milestone set to Firmware 2.3
  • Severity changed from unknown to normal
  • Status changed from infoneeded to confirmed
  • Summary changed from Samba access denied on 2.3.7.0 Paco to Media to Wide links = no breaks Media share

Ah, looking more closely to your error screenshot, it seems that you can access the Media share fine, but then clicking the "Files" disk within that errors out (which you already said, but I guess I misread that).

This is because of the wide links thing I mentioned before. Apparently Windows shows the inaccessible "Files" disk within the Media share and then gives an error (as opposed to Linux/Nautilus?, which just shows an empty Media share instead).

So, now I understand the problem, but I'm still not sure what the proper solution would be. We don't want to enable wide links for the Media share, since that opens up the possibility of accessing / deleting files outside of the USB disk(s) again. I suspect that Samba doesn't really offer anything useful for our usecase here. We could perhaps patch Samba to allow links only within /tmp/run/mountd, but that would still potentially allow symlinks between USB disks / partitions (in theory, anyway).

We could consider using bindmounts in /tmp/mounts (or mount in /tmp/mounts directly and ditch /tmp/run/mountd), but I can't really oversee the consequences of that right now...

comment:5 Changed 4 years ago by matthijs

  • Milestone changed from Firmware 2.3 to Firmware 2.3.8.0

comment:6 Changed 4 years ago by matthijs

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [2298]) samba3: Fix the Media share

In r2236, the "wide links" configuration parameter was set to "no", to disallow symlinks on a device to point outside of the USB disk itself.

However, the "Media" share contains symlinks to each of the mounted disks, which no also stopped working.

This commit adds a patch to samba to allow adding an exception to this wide links restriction: One additional path (per share) into which symlinks can be pointed.

This exception is set to /tmp/run/mountd/ so symlinks can point to all mounted disks. This has the side-effect of also allowing symlinks from one USB disk to another (but only when accessed through the Media share), but this shouldn't really be a problem.

Closes: #1243

comment:7 Changed 4 years ago by matthijs

If you want to test this fix, the easiest way is to use a prebuilt SVN version:

http://download.fonosfera.org/auto-builds/fon-ng/fon-ng-r2299/fonera2n/

This build includes the above fix. Note that even though this is a work-in-progress, the firmware should still be fairly similar to the 2.3.7.0 release, except for 3G support which has been considerably reworked (and might not work as expected). If you don't rely on a 3G connection, you should not expect any problems from this new revision (and in any case, you can always downgrade back to 2.3.7.0).

comment:8 Changed 4 years ago by matthijs

  • Milestone changed from Firmware 2.3.8.0 to Firmware 2.3.7.1

comment:9 Changed 4 years ago by matthijs

(In [2332]) Backport r2298: samba3: Fix the Media share

In r2236, the "wide links" configuration parameter was set to "no", to disallow symlinks on a device to point outside of the USB disk itself.

However, the "Media" share contains symlinks to each of the mounted disks, which no also stopped working.

This commit adds a patch to samba to allow adding an exception to this wide links restriction: One additional path (per share) into which symlinks can be pointed.

This exception is set to /tmp/run/mountd/ so symlinks can point to all mounted disks. This has the side-effect of also allowing symlinks from one USB disk to another (but only when accessed through the Media share), but this shouldn't really be a problem.

References: #1243

comment:10 Changed 4 years ago by matthijs

#1327 is a duplicate.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.