<div class="gmail_quote">On Tue, Nov 15, 2011 at 11:55 PM, William Muriithi <span dir="ltr"><<a href="mailto:william.muriithi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org">william.muriithi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi pals,<br>
<br>
A quick question if anyone out here has done a similar thing.<br>
<br>
I have set up a ftp so that users can upload files anonymous, but they<br>
can not see the file after they have uploaded it.  That has working<br>
fine. The problem is, once  the files uploaded, one can only access<br>
them through console and the end user is not technical for such an<br>
interface.  I was trying to find a way they can use these files<br>
without relying on me to copy them over to an easily accessible<br>
location.<br>
<br>
My plan was to somehow share the FTP data directory through samba. The<br>
FTP data directory is on an iscsi, so I count mount it on the FTP<br>
server rw and mount it on the samba file server as ro.<br>
<br>
On the ftp host, I have set up the ftp server so that the file<br>
permission are as follows<br>
<br>
ls -al /var/ftp/<br>
drwx-wx---.  3 username1 ftp  4096 Nov 15 22:49 videos<br>
<br>
ls -al /var/ftp/videos/<br>
-rw-------. 1 username1 ftp   244246 Nov 15 22:15 The economics of<br>
good looks- The line of beauty | The Economist.pdf<br>
<br>
 mount<br>
/dev/sdb1 on /var/ftp/videos type ext3 (rw,noexec,nosuid,nodev,_netdev)<br>
<br>
On the samba host, I have mounted the same device but this time read only<br>
<br>
/dev/sdao1 on /media/storage/videos type ext3 (ro,noexec,nosuid,nodev,_netdev)<br>
<br>
My hope was, the user and group properties would remain the same.<br>
However, this is not the case<br>
<br>
ls -al /media/storage/videos<br>
-rw-------  1   500 staff  244246 2011-11-15 22:15 The economics of<br>
good looks- The line of beauty | The Economist.pdf<br>
<br>
Notice the file is now owned by userID 500?  The group is different<br>
too despite being the same files system. Anyone know why this<br>
happened?  The user username1 also exist on the samba host, so not<br>
sure why it was not mapped as it was on the FTP server<br></blockquote><div><br>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).<br>
<br>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. <br>
</div></div>