Suggestion on samba & anonymous FTP setup

Andrej Marjan andrej-igvx78u1SeH3fQ9qLvQP4Q at public.gmane.org
Wed Nov 16 14:24:42 UTC 2011


On Tue, Nov 15, 2011 at 11:55 PM, William Muriithi <
william.muriithi-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:

> Hi pals,
>
> A quick question if anyone out here has done a similar thing.
>
> I have set up a ftp so that users can upload files anonymous, but they
> can not see the file after they have uploaded it.  That has working
> fine. The problem is, once  the files uploaded, one can only access
> them through console and the end user is not technical for such an
> interface.  I was trying to find a way they can use these files
> without relying on me to copy them over to an easily accessible
> location.
>
> My plan was to somehow share the FTP data directory through samba. The
> FTP data directory is on an iscsi, so I count mount it on the FTP
> server rw and mount it on the samba file server as ro.
>
> On the ftp host, I have set up the ftp server so that the file
> permission are as follows
>
> ls -al /var/ftp/
> drwx-wx---.  3 username1 ftp  4096 Nov 15 22:49 videos
>
> ls -al /var/ftp/videos/
> -rw-------. 1 username1 ftp   244246 Nov 15 22:15 The economics of
> good looks- The line of beauty | The Economist.pdf
>
>  mount
> /dev/sdb1 on /var/ftp/videos type ext3 (rw,noexec,nosuid,nodev,_netdev)
>
> On the samba host, I have mounted the same device but this time read only
>
> /dev/sdao1 on /media/storage/videos type ext3
> (ro,noexec,nosuid,nodev,_netdev)
>
> My hope was, the user and group properties would remain the same.
> However, this is not the case
>
> ls -al /media/storage/videos
> -rw-------  1   500 staff  244246 2011-11-15 22:15 The economics of
> good looks- The line of beauty | The Economist.pdf
>
> Notice the file is now owned by userID 500?  The group is different
> too despite being the same files system. Anyone know why this
> happened?  The user username1 also exist on the samba host, so not
> sure why it was not mapped as it was on the FTP server
>

It's not something I've done myself, but to me it seems that username1 has
a diffrent ID on the samba host than the ftp host (and that the samba host
has no user with ID 500).

That said, it's been years since I've dealt with samba but I'm pretty sure
it can be configured to ignore the underlying UNIX permissions on files. Or
you could allow a group with an ID that's common on both hosts read access
to all the files, and tell Samba to use that group.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20111116/22c5663c/attachment.html>


More information about the Legacy mailing list