Shared Directories, chroot, & my ftp server
On a first glance, this problem looks like it might be some elaborate setting with my FTP server, but it's documentation doesn't even go near my problem, but it seems like a basic function of the OS type of thing.
My goal is to have an FTP server that both anonymous users can use and see certain things, and that preselected people (re: users) can also log in to and get access to varying content.
I have sucessfully got up and running pure-ftpd, a nice little ftp program. It works great... Anonymous users go to the /srv/ftp/ directory, where I can place content there for anonymous users.
Now, I got it set up to use local users via the /etc/passwd file. Any user that can login to my computer can log into my ftp server. Which works well. Since I am "going off of" that, I'll use group membership and folder permissions to restict each user to their content.
The main part of my goal is to do something along the lines of create a user for my mom to share pictures of the family, one for a few friends to share music videos and audio files, and a couple other friends get access to my porn - and select users might get access to family pics and my music, and others can get my music and my porn (some people, I don't want having access to the family pictures, ya know?) So I'll create "music" "video" "porn" and "family" groups, assign the content to its rightful group, and add people to and from groups to manage content and get a system going.
That, and I got other stuff hosted on this machine, meaning I do not want ftp users snooping around all over my machine. So, I opt to "chroot" my users into their home directory, which seems like a good idea.
Now the problem, if I jail my users to their home directory, how do I share content from another partition? All the "good stuff" and content is mounted on, lets say /storage/. From there, it goes /storage/music and then theres /storage/family and so on.
Since the users are confined to their home directories, I cannot think of a way to share this content. Creating a link doesn't work. Well, it does if users are not confined to their home directory, but thats a heavy security risk. I cannot find anything in the pure-ftpd documentation that says anything about directing all logged in users to one directory, because if I could make it to where ALL users, anonymous AND authenticated, all go to the same destination (say /srv/ftp for instance)
So, my question is multipart. Any ends to one mean.
- Is there a way to create a shared directory, in a chroot environemnt, to give access to content on another partition?
- Is there a hidden option in pure-ftpd to direct ALL users to one predefined place?
- If you have read my scenario, and can think of another "work around" or solution, what is it?
Other info that might help is the server is running on Suse 9.3, its also acting as an HTTP server and a game server... an old Dell Dimension 8100. Boat anchor. Need anything else, ask!
|