Koozali.org: home of the SME Server

Follow symlinks in Samba?

Offline krisahil

  • 4
  • +0/-0
Follow symlinks in Samba?
« on: March 12, 2010, 08:08:25 PM »
Maybe I'm going about this the wrong way, but I'd appreciate anyone's advice:

I have a network scanner that can scan to FTP. I've set it to scan to the home folder of user "scan" (/home/e-smith/files/users/scan). However, I have a file share (using SharedFolders contrib) called "general" that is at /home/e-smith/files/shares/general/files. I created a symlink under "general" that points to folder ~scan/files, but it doesn't show up when I browse from a Windows computer.

Any ideas? How can I make symbolic links work under Samba? I tried setting up an ibay, but couldn't get scan-via-ftp to work with it.

Thanks for all your help.
-Chris

Offline Mat78

  • ***
  • 51
  • +0/-0
Re: Follow symlinks in Samba?
« Reply #1 on: March 12, 2010, 08:59:53 PM »
You can setup a custom template for samba to share your folder (/home/e-smith/files/users/scan).

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: Follow symlinks in Samba?
« Reply #2 on: March 12, 2010, 11:13:31 PM »
Try http://www.dungog.net/wiki/Smeserver-remoteuseraccess

This can mapped the home FTP directory to an Ibay, but I don't know if can mapped to a shared folder

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: Follow symlinks in Samba?
« Reply #3 on: March 13, 2010, 08:20:28 AM »
symlinks just work

you have a permission problem, only the user scan would be able to see his files when they are linked to an ibay

Offline krisahil

  • 4
  • +0/-0
Re: Follow symlinks in Samba?
« Reply #4 on: March 16, 2010, 07:28:23 PM »
Snoble, you are right. Symlinks do work.
I fixed it by changing recursively the permissions of the home folder of "scan" to 755.
This allows him to put scans there via FTP and everyone can view the scan files in his folder.
Thanks for all the help.

Offline krisahil

  • 4
  • +0/-0
Re: Follow symlinks in Samba?
« Reply #5 on: March 17, 2010, 04:25:39 PM »
Maybe you all could help me understand the permissions a bit more. When a file is created via FTP by user "scan" in his home folder, it's permission is 600. However, I need it to be 644. I though about umask, but that cannot grant extra permissions beyond what the program that created the file gives it.

How do I make all files created by user "scan" in his home folder via FTP have permissions of 644? Thanks so much for all help...
-Chris

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Follow symlinks in Samba?
« Reply #6 on: March 17, 2010, 04:32:42 PM »
IMO you are using the wrong approach..

create an ibay and use it for scans.. or, following Normando's advice, chroot ftp scan user into the shared folder..
playing with permissions in home dir is not a good idea

Offline krisahil

  • 4
  • +0/-0
Re: Follow symlinks in Samba?
« Reply #7 on: March 17, 2010, 06:01:29 PM »
Thanks, Stefano. I took your advice and made it much simpler:
1) Created ibay to hold scanned files.
2) Use Smeserver-remoteuseraccess to chroot user "scan" to the files folder of this ibay.
3) Create symlink to this files folder from another shared folder.

Thanks all for the help.