LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-23-2009, 03:36 PM   #1
Guardian-Mage
Member
 
Registered: Jan 2008
Posts: 36

Rep: Reputation: 15
ProFTPd quotes cause permission error


I have ProFTPd setup with virtual users and mysql, and when I enable quotas for a user by inserting an entry in the database, it makes it so the user can write files, but cannot read or delete them, they can't even change directory.

Any ideas why?
 
Old 04-23-2009, 03:50 PM   #2
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 38
You might want to post the config file here and then it may help someone assist you with the answer.
 
Old 04-23-2009, 04:16 PM   #3
Guardian-Mage
Member
 
Registered: Jan 2008
Posts: 36

Original Poster
Rep: Reputation: 15
Code:
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

#LoadModule mod_sftp.c
#SFTPEngine on
#SFTPHostKey /etc/ssh/ssh_host_dsa_key
#SFTPHostKey /etc/ssh/ssh_host_rsa_key
#SFTPOptions IgnoreSCPUploadPerms
#<Limit SYMLINK READ DIRS>
#       DenyAll
#       Order Allow,Deny
#       Allow All
#       AllowGroup ftpgroup
#</Limit>

ServerName                      "ProFTPD Default Installation"
ServerType                      standalone
DefaultServer                   on
UseReverseDNS off
IdentLookups off
ShowSymlinks on
VRootEngine on
VRootOptions allowSymlinks

UseFtpUsers off

<IfModule mod_auth_pam.c>
   AuthPAM off
   AuthPAMAuthoritative off
</IfModule>

#AuthPAM                         off
#AuthPAMAuthoritative            off
#AuthUserFile                    /etc/proftpd.users
#RequireValidShell               no

# Port 21 is the standard FTP port.
Port                            21

# Don't use IPv6 support by default.
UseIPv6                         off

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask                           022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances                    30

# Set the user and group under which the server will run.
User                            proftpd
Group                           proftpd

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite          on

<Limit SITE_CHMOD>
        AllowGroup ftpgroup
        AllowUser ftpuser
        AllowAll
</Limit>

<Limit LOGIN>
  DenyAll
  AllowGroup ftpgroup
</Limit>

#LoadModule mod_quotatab.c
#LoadModule mod_quotatab_sql.c

# The passwords in MySQL are encrypted using CRYPT
SQLAuthTypes            Plaintext Crypt
SQLAuthenticate         users groups

# used to connect to the database
# databasename@host database_user user_password
SQLConnectInfo  ftp@localhost ftp_admin <PASSWORD>


# Here we tell ProFTPd the names of the database columns in the "usertable"
# we want it to interact with. Match the names with those in the db
SQLUserInfo     ftpuser userid passwd uid gid homedir shell

# Here we tell ProFTPd the names of the database columns in the "grouptable"
# we want it to interact with. Again the names match with those in the db
SQLGroupInfo    ftpgroup groupname gid members

# set min UID and GID - otherwise these are 999 each
SQLMinID        500

# create a user's home directory on demand if it doesn't exist
#SQLHomedirOnDemand on

# Update count every time user logs in
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "count=count+1, accessed=now() WHERE userid='%u'" ftpuser

# Update modified everytime user uploads or deletes a file
SQLLog  STOR,DELE modified
SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'" ftpuser

# User quotas
# ===========
QuotaEngine on
QuotaDirectoryTally on
QuotaDisplayUnits Mb
QuotaShowQuotas on

SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM ftpquotalimits WHERE name = '%{0}' AND quota_type = '%{1}'"

SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM ftpquotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"

SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name = '%{6}' AND quota_type = '%{7}'" ftpquotatallies

SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" ftpquotatallies

QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally

RootLogin off
RequireValidShell off
 
Old 04-24-2009, 07:44 AM   #4
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 38
In your config you don't have the quota module enabled you need to remove the comments:


#LoadModule mod_quotatab.c
#LoadModule mod_quotatab_sql.c

I think that's important

Here is a link to more info:

http://heker86.wordpress.com/2008/10...ate-the-mysql/
 
Old 04-24-2009, 01:56 PM   #5
Brandon.Wamboldt
Member
 
Registered: Apr 2009
Posts: 30

Rep: Reputation: 15
I compiled it with quota tab built in, so those cause the already loaded errors.
 
  


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
ProFTPd - Change proftpd.conf location ('not found' error) varney Linux - Newbie 1 02-22-2008 01:51 AM
something about proftpd permission,please help singying304 Linux - General 0 08-11-2006 12:50 AM
Using single quotes vs double quotes in PHP strings vharishankar Programming 6 07-11-2005 11:41 AM
weired ProFtpd error: 550 Overwrite permission denied !! apache Linux - Software 1 07-23-2004 06:21 AM
ProFTPD permission problems Slacker0815 Linux - Networking 0 07-17-2004 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:40 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