You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by ac...@redhada.es on 2008/02/28 12:12:24 UTC

mina ftp server permissions

Dear list,
I'm writing because I'm using your Incubator FTP server for development
purposes.
I'm getting my user management data from my Postgresql database:
All users should be able to read and write from/to the ftpserver directory:
anonymous user can Read & Write from/to the ftp server, nevertheless the
users in my database can't either read or write (eventhough write
permission and enable flag are set to TRUE).
Login & password are correctly recognized, therefore I can suposse that
database connection is correct.

Is there another place besides database users' table where I can give
permissions to all users?
Thankyou in advance,

ANA
PS: next you can read: first the configuration data, next the runtime
results.

*~*~*~*~*~*~*~*~*~*~*~*~
##-----------------------------------------------------------------------------
## Database based user manager configuration
##-----------------------------------------------------------------------------
config.user-manager.class=org.apache.ftpserver.usermanager.DbUserManager
#config.user-manager.admin=admin
config.user-manager.jdbc-driver=org.postgresql.Driver
config.user-manager.jdbc-url=jdbc:postgresql://localhost:5432/genfc_test_january
config.user-manager.jdbc-user=*****
config.user-manager.jdbc-password=*****

config.user-manager.sql-user-insert=INSERT INTO
genfc.genfc_user (user_id, usertype_utype,pass, homedirectory, enableflag,
writepermission, idletime, uploadrate, downloadrate)
VALUES ('{user_id}','Developer', '{pass}',
 '{homedirectory}', 'TRUE', 'TRUE', {idletime}, {uploadrate}, {downloadrate})

config.user-manager.sql-user-update=UPDATE genfc.genfc_user SET
pass\='{pass}', homedirectory\='{homedirectory}',
enableflag\='TRUE',writepermission\='TRUE',
idletime\={idletime},uploadrate\={uploadrate},
downloadrate\={downloadrate} WHERE user_id\='{user_id}'


config.user-manager.sql-user-delete=
DELETE FROM genfc.genfc_user WHERE user_id \= '{user_id}'


config.user-manager.sql-user-select=
SELECT user_id, pass, homedirectory, enableflag, writepermission,
 idletime, uploadrate, downloadrate
FROM genfc.genfc_user WHERE user_id \= '{user_id}'


config.user-manager.sql-user-select-all=
SELECT user_id FROM genfc.genfc_user ORDER BY user_id


config.user-manager.sql-user-authenticate=
SELECT user_id FROM genfc.genfc_user WHERE user_id\='{user_id}' AND
pass\='{pass}'


config.user-manager.sql-user-admin=
SELECT user_id FROM genfc.genfc_user WHERE user_id\='{user_id}' AND WHERE
usertype_utype\='Administrator'

*~*~*~*~*~*~*~*~*~*~*~*~
*~*~*~*~*~*~*~*~*~*~*~*~
CONSOLE RESULTS
TRL     <   220 Service ready for new user.
CTRL      >  QUIT
CTRL     <   221 Goodbye.
CTRL     <   220 Service ready for new user.
CTRL      >  USER redjorge
CTRL     <   331 User name okay, need password for redjorge.
CTRL      >  PASS redjorge
CTRL     <   230 User logged in, proceed.
CTRL      >  TYPE I
CTRL     <   200 Command TYPE okay.
getDataTransferMode()300
CTRL      >  PWD
Contents of directory '/'
CTRL     <   257 "/" is current directory.
CTRL      >  PORT 172,16,0,14,6,241
CTRL     <   200 Command PORT okay.
CTRL      >  NLST .
CTRL     <   150 File status okay; about to open data connection.
    DATA <   18 bytes
CTRL     <   226 Closing data connection.
CTRL      >  PORT 172,16,0,14,6,243
CTRL     <   200 Command PORT okay.
CTRL      >  LIST
CTRL     <   150 File status okay; about to open data connection.
    DATA <   122 bytes
CTRL     <   226 Closing data connection.
myfiles:download	 path download	 canread false	canwrite false
myfiles:upload	 path upload	 canread false	canwrite false
   NAME n°1 -> download
   NAME n°2 -> upload
CTRL      >  CWD /upload
CTRL     <   550 No such directory.
org.finj.FTPException: FTP Server stated : [550 No such directory.]
	at
org.finj.profile.StrictFTPServerProfile.isCWDCommandCompleted(StrictFTPServerProfile.java:329)
	at
org.finj.profile.StrictFTPServerProfile.isCommandCompleted(StrictFTPServerProfile.java:103)
	at org.finj.FTPClient.processCommand(FTPClient.java:559)
	at org.finj.FTPClient.setWorkingDirectory(FTPClient.java:2314)
	at test.main(test.java:39)
*~*~*~*~*~*~*~*~*~*~*~*~