LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-29-2004, 05:55 AM   #1
komadich
LQ Newbie
 
Registered: May 2004
Posts: 5

Rep: Reputation: 0
vsftpd config: permissions with NTFS problem


i'm trying to set up a FTP server with some of the data on my NTFS partition. As far as I understand, it is necessary to manage the file permissions to limit the access. I put a soft link in the home directory of the user to the desired directory on the NTFS drive, but the NTFS drive has r-xr-xr-x, so the user can browse anything.

how do I limit the access?

thanks
 
Old 11-29-2004, 06:05 AM   #2
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
You cant. NTFS does not support Linux Permissions.
Copy the data only a Disk with a decent filesystem like Reiserfs ext3 jfs xfs or any of the linux supported formats.
 
Old 10-10-2010, 09:34 AM   #3
Carman23
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
Hi. I got it working for me. Here are details:

I have an external NTFS Gigabyte drive that I called "Store01". This volume contains a directory called "/ftp". I want anonymous people to upload to what is seen thru FTP as "/ftp/pub", and I want this to actually be /ftp on my NTFS drive.

First, vsftpd wants the anonymous root directory to be owned by ftp:ftp

So, I looked in the user file to find the id for ftp:
Code:
cat /etc/passwd
and found that on my system ftp us userid 14

Then I looked in the groups file to find the id for the ftp group:
Code:
cat /etc/group
and found that on my system the ftp group is 50

Next, I looked to see what device name my NTFS volume has:
Code:
fdisk -l
on my system, my NTFS volume is shown to be called: /dev/sdc1

So, I created a mount point for it thus (I'm arbitrarily calling it "Store01":
Code:
mkdir /mnt/Store01
in /etc/fstab, this line gets the NTFS volume mounted at /mnt/Store01:
Code:
/dev/sdc1    /mnt/Store01    ntfs-3g    nls=utf8,auto,user,rw,uid=14,gid=50,umask=0000,defaults 0 0
Note that it is going to belong to user 14, which is ftp on my system, and group 50, which is ftp on my system. VSFTPD requires that anonymous upload directories to belong to ftp:ftp

Now I define a mount point I want to use as my anonymous root:
Code:
mkdir /var/ftp
chown root:root /var/ftp
mkdir /var/ftp/pub
chown ftp:ftp /var/ftp/pub
Notice /var/ftp is owned by root:root, and therefore cannot be written to by vsftpd. This is a requirement of vsftpd for a root anonymous directory, that the anonymous root directory not be writable. So, /var/ftp is what I'm going to use as the anonymous root directory.
But /var/ftp/pub is writeable by vsftpd. It appears to anonymous users as a "pub" directory on the FTP site where they can write files.

So I add this line to /etc/fstab, which will point /var/ftp/pub (the anonymous writable directory) to the /ftp folder on my NTFS volume:
Code:
/mnt/Store01/ftp    /var/ftp/pub    auto    bind 0 0
And finally, in /etc/vsftpd/vsftpd.conf, this line:
Code:
anon_root=/var/ftp
Now an anonymous user can upload into the "pub" directory, on the anonymous FTP site. Files uploaded there will appear in /ftp on my NTFS volume.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VSFTPD + permissions streptococcus Linux - Networking 4 04-11-2005 08:48 AM
VSFTPD Permissions R4z0r Linux - Security 2 08-21-2004 11:27 AM
VSFTPD config problem nadsab Linux - Software 0 08-05-2004 02:37 PM
VSFTPD Debian VSFTPD "unrecognised variable in config file" DCT Linux - Software 0 05-29-2004 11:59 PM
vsftpd config- permissions, allowing uploads lynchpin9 Linux - Networking 1 10-20-2003 01:13 PM


All times are GMT -5. The time now is 12:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration