LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-22-2005, 01:50 AM   #1
Waerner
Member
 
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Rep: Reputation: 15
Pure-ftpd - user access and privilegies?


Hi, does anyone use pure-ftpd, connected to an "account list" in MySQL?

The server works and the users I add are able to connect. BUT they automatically get access to the whole filesystem - read only though, but anyway, they can download and browse any single folder.

I've tried to check the FAQ/ReadMe and the pure-ftpd MySQL-docs many times, but can't find any descriptions how to solve this.

Does it have anything with chmod to do?

I know that this doensn't really belong here, but I really feel that I have to solve it, but I can't do it all by myself

Last edited by Waerner; 08-22-2005 at 01:54 AM.
 
Old 08-23-2005, 12:29 PM   #2
ramil
LQ Newbie
 
Registered: Aug 2005
Posts: 20

Rep: Reputation: 0
Looks like you've complied sources with `--with-virtualchroot` switch.

When start the server, add the `-A` switch, this should chroot everyuser, but symbolic links won't be followed as well.

Hope this helps!
 
Old 08-24-2005, 03:53 PM   #3
Waerner
Member
 
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Original Poster
Rep: Reputation: 15
Okay, thanks alot, it seems like I can add and remove files in the /home/ directory.

The folder-structure in /home/ looks like this:

/home/linus/
-Archive
-Desktop
-Program
-Some apps


Well, in the MySQL-database for pure-ftpd, the user "linus" has /home/linus/Archives set as default folder, BUT with the '-A', the users default is /home/linus/, where he also are able to delete/add files and folders. BUT, files can only be written in /home/linus/, and not in any already existing subfolders - but in other ones if they're created.

I don't understand the logic in it

I want the folder /home/linus/Archives to be the only one the user can see - and write/read to.
With the '-A' parameter, the user can't browse the whole filesystem like earlier.

The parameters I used during ./configure was the MySQL-flag and the Cookie-flag.
 
Old 08-25-2005, 03:32 AM   #4
ramil
LQ Newbie
 
Registered: Aug 2005
Posts: 20

Rep: Reputation: 0
if you want `linus` user to have access to /home/linus/Archives only, then set this path as the user's home dir. Or do you need this user to be able to use /home/linus when working through ssh or something else?
 
Old 08-25-2005, 08:08 AM   #5
Waerner
Member
 
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Original Poster
Rep: Reputation: 15
Okay, finally I got the homedir-thing to work. It seems to be a bit correct, atleast 'linus' CAN'T browse nothing more than his homedir. Which is great, but he can neither write any files to it, even if I use the -A parameter.

Last edited by Waerner; 08-25-2005 at 08:18 AM.
 
Old 08-25-2005, 10:50 AM   #6
ramil
LQ Newbie
 
Registered: Aug 2005
Posts: 20

Rep: Reputation: 0
can 'linus' do it locally? I mean, if you `su` as that user, can you do locally what you want to do via ftp?
 
Old 08-25-2005, 11:47 AM   #7
Waerner
Member
 
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Original Poster
Rep: Reputation: 15
Yes, the local user linus has full privilegies. But do the pure-ftpd user has anything with local users to do? I mean, pure-ftpd is compiled to get user authentication from a MySQL database.

Actually, 'linus' has all access a user can get, it's the user I created when I installed Ubuntu.
 
Old 08-25-2005, 11:59 AM   #8
ramil
LQ Newbie
 
Registered: Aug 2005
Posts: 20

Rep: Reputation: 0
I didn't find how you can set permissions using mysql database, I believe that local system 'linus' user and the one in your pureftpd mysql database are associated. I would suggest you creating a user (w/ the name that isn't used for another local system account) via mysql db and checking it out.
 
Old 08-26-2005, 02:06 PM   #9
Waerner
Member
 
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Original Poster
Rep: Reputation: 15
I added the user "stew" and that account had the same problem and privilegies.
Do you perhaps know any others parameter or ways to handle user-accounts in an easier way?
 
Old 08-26-2005, 02:53 PM   #10
ramil
LQ Newbie
 
Registered: Aug 2005
Posts: 20

Rep: Reputation: 0
hi

being honest I can't identify the problem there. just trying to see what that is. I would try recompile it with `--with-puredb` and see how the server would behave itself after that
 
Old 09-01-2005, 11:04 AM   #11
Waerner
Member
 
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Original Poster
Rep: Reputation: 15
Okay, I re-compiled it with --with-puredb.

Did as the readme says and created a new system group (ftpgroup)
and a new system user (ftpuser).

Added a user and set his homedirectory to /home/ftp/linus and the problems still remain.
He can browse the whole filesystem and are able to write to /home/linus instead of his homedir /home/ftp/linus.

This is pretty weird?
 
Old 10-25-2005, 03:20 PM   #12
Waerner
Member
 
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Original Poster
Rep: Reputation: 15
Hello, first of all, sorry for giving this thread new life again, but I've made some successfull moves:


I got everything to work with the authentication.

BUT, I have one problem.
The users can't write to their home directories, and they can browse the whole filesystem.

The homedir looks like this: /ftp/homedir
Where /ftp/ are located in the root of the filesystem.

How do I solve a problem like this? I can nothing about chmod and privilegies, so I ask you guys

Greetings
 
  


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
pure-ftpd roofy Linux - Software 6 03-05-2007 04:06 AM
Pure-ftpd Yoinx Linux - Software 0 10-18-2004 12:12 PM
Pure-ftpd zaicheke Linux - Software 2 08-19-2004 06:20 PM
Limit access to pure-ftpd by ip address smolz Linux - Software 0 08-03-2004 07:54 PM
Pure-ftpd help ksgill Linux - Newbie 15 04-18-2003 12:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:06 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
Open Source Consulting | Domain Registration