Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-22-2005, 01:50 AM
|
#1
|
Member
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92
Rep:
|
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.
|
|
|
08-23-2005, 12:29 PM
|
#2
|
LQ Newbie
Registered: Aug 2005
Posts: 20
Rep:
|
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!
|
|
|
08-24-2005, 03:53 PM
|
#3
|
Member
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92
Original Poster
Rep:
|
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.
|
|
|
08-25-2005, 03:32 AM
|
#4
|
LQ Newbie
Registered: Aug 2005
Posts: 20
Rep:
|
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?
|
|
|
08-25-2005, 08:08 AM
|
#5
|
Member
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92
Original Poster
Rep:
|
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.
|
|
|
08-25-2005, 10:50 AM
|
#6
|
LQ Newbie
Registered: Aug 2005
Posts: 20
Rep:
|
can 'linus' do it locally? I mean, if you `su` as that user, can you do locally what you want to do via ftp?
|
|
|
08-25-2005, 11:47 AM
|
#7
|
Member
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92
Original Poster
Rep:
|
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.
|
|
|
08-25-2005, 11:59 AM
|
#8
|
LQ Newbie
Registered: Aug 2005
Posts: 20
Rep:
|
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.
|
|
|
08-26-2005, 02:06 PM
|
#9
|
Member
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92
Original Poster
Rep:
|
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?
|
|
|
08-26-2005, 02:53 PM
|
#10
|
LQ Newbie
Registered: Aug 2005
Posts: 20
Rep:
|
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
|
|
|
09-01-2005, 11:04 AM
|
#11
|
Member
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92
Original Poster
Rep:
|
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?
|
|
|
10-25-2005, 03:20 PM
|
#12
|
Member
Registered: May 2005
Location: Örebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 04:06 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|