FTP and folder/drive ownership

Status
Not open for further replies.

SeaFox

Explorer
Joined
Aug 6, 2013
Messages
98
I'm trying to configure the FTP server into a setup that support user login and chroot to home folders, but I'm having some issues.

I've tried to look up info on how to do this and one problem I'm having is every stinkin' tutorial assumes I'm running ZFS. This is FreeNAS x86 and I don't have the memory/processing power/or lots of disks that ZFS is really made for. There are two hard drives.
  • An 80 GB IDE drive that has the Jails, some CIFS shares, an instance of NginX, and the FTP server files all on it (one logical volume).
  • A 250 GB SATA drive that serves as combined media storage space for DLNA and downloading space for torrenting (one logical volume).
NginX is up and running and the Transmission jail is symlinked to a folder on the larger drive from it's jail on the smaller drive etc, and that that's all working.

The FTP server is getting it's files from /mnt/drive/ftp.
The ownership on the drive "drive" is the user "guest", group "guest".

I originally had this configured as a single shared folder and downloading-only worked. That was with a user account I set up specifically for this use -- "ftpguest", which was part of the group "ftp". I used a CIFS share of the same directory to upload new content to it.

I now want to set up an additional user and have the them chroot into user folders within the ftp folder.
So when user "ftpguest" logs in they will see their folder's files, for download only, meanwhile I can log in with a new user account (in the ftp group) and be taken to a separate folder where I can download and upload data for use syncing devices over FTP.

At this point I have the original "ftp" folder belonging to nobody:ftp and two subfolders.
  • ftpguest, which belongs to the old guest login (ftpguest:ftp).
  • My new folder, which belong to myself:ftp.
I try and access the server on the internal LAN IP for now, and while I'm told my password is fine, but I cannot chroot to my home folder for either login because access is denied, even though each login has ownership of their respective folder.

I don't want to make any drastic changes to the permissions on the rest of the drive as I fear messing up some of the other functioning services, and I don't think I should need to since I had this working with a required login before (and externally accessable). Just without the chroot restricting the user before.
 
Status
Not open for further replies.
Top