Solved

Cpanel user without being able to ftp (pure-ftp)

Posted on 2006-06-11
9
1,466 Views
Last Modified: 2013-12-16
(Background: I've been a Linux sysadmin for years, but am new to Cpanel/WHM which this client requires).

I'm setting up a series of accounts through whm, which will need to have cpanel access (no file manager - easy enough to disable), and no ftp access (as there is a custom content manager on the server for these users).

The ftp server is pure-ftpd.  How does one disable ftp access without deleting the account, or disabling access to cpanel?

It looks like pure-ftp under Cpanel runs using pure-auth, using a script called pureauth.

I looked at the script - and it seems to point to a file a called /etc/ftpusers as being a place where you can add usernames that won't be allowed to login.

However, even after creating this file, adding the user name to that file, and restarting the ftp server, this is not being obeyed... any ideas?
0
Comment
Question by:periwinkle
  • 6
  • 3
9 Comments
 
LVL 16

Expert Comment

by:xDamox
ID: 16881363
Hi,

What does the pure-ftpd.conf file say? Would it be possible to pate your config file as pure-ftpd has a variety of authentacation methods and in the pure-ftpd.conf file you will know what method is being used.
0
 
LVL 15

Author Comment

by:periwinkle
ID: 16882007
xDamox -

Thanks for the comment.  From rc.c/init.d, the following are being started:

/usr/sbin/pure-config.pl /etc/pure-ftpd.conf -O clf:/var/log/xferlog -lextauth:/var/run/ftpd.sock --daemonize
/usr/sbin/pure-authd -s /var/run/ftpd.sock -r /usr/sbin/pureauth

The /etc/pure-ftpd.conf contains the following (comment lines eliminated for brevity):

ChrootEveryone              yes
BrokenClientsCompatibility  no
MaxClientsNumber            50
Daemonize                   yes
MaxClientsPerIP             8
VerboseLog                  no
DisplayDotFiles             yes
AnonymousOnly               no
NoAnonymous yes
SyslogFacility              ftp
DontResolve                 yes
MaxIdleTime                 15
ExtAuth /var/run/ftpd.sock
LimitRecursion              2000 8
AnonymousCanCreateDirs      no
MaxLoad                     4
AntiWarez                   yes
Umask                       133:022
MinUID                      100
AllowUserFXP                no
AllowAnonymousFXP           no
ProhibitDotFilesWrite       no
ProhibitDotFilesRead        no
AutoRename                  no
AnonymousCantUpload         no
AltLog  xferlog:/usr/local/apache/domlogs/ftpxferlog
MaxDiskUsage               99
CustomerProof              yes
TLS     1



0
 
LVL 16

Expert Comment

by:xDamox
ID: 16884171
Hi,

I have only messed with pure-ftpd with MySQL backend there dosnt seem to be any arguments specifying a file
with users to deny access. You could have a look at:

http://www.howtoforge.com/taxonomy_menu/1/35

There are alot of pure-ftpd guides there.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 15

Author Comment

by:periwinkle
ID: 16885306
This is definitely something specific to CPanel usage;  the copyright on the script is from CPanel.  Their forums have netted ZERO replies - very frustrating.

0
 
LVL 15

Author Comment

by:periwinkle
ID: 16888286
xDamox - thanks for the resource, but this isn't using the MySQL backend as you noted;  the pure-ftpd guides there don't seem to address this issue.

Really, what the server owner would like is to be able to create a cpanel user that doesn't have ftp access - is that impossible???
0
 
LVL 16

Accepted Solution

by:
xDamox earned 500 total points
ID: 16888400
Hi,

I found this it may be usful http://download.pureftpd.org/pub/pure-ftpd/doc/README.Virtual-Users you can set it not
to use the /etc/passwd file.
0
 
LVL 15

Author Comment

by:periwinkle
ID: 16888480
Thanks, I did see that.  My concern is breaking the ability to use the cpanel which my client is going to use to manage the site, mostly without me.  I'll give it another look.  I've also submitted a support ticket with cpanel - hopefully I'll get a quick response.
0
 
LVL 15

Author Comment

by:periwinkle
ID: 16890531
Well, support has mailed back;  it appears that there is a bug in the pureauth code that prevents the /etc/ftpusers file from properly being checked!  I'm not going crazy - phew!
0
 
LVL 15

Author Comment

by:periwinkle
ID: 16890535
xDamox - I awarded you the points for the support - it was appreciated, and the resources that you provided will be valuable to someone - thanks again!
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question