3

I have a debian with pure ftpd installed with virtual users.

I used the documentation for my setup so the local account of pure ftpd is ftpuser:ftpgroup When a user uploads a file, the file is owned by ftpuser:ftpgroup. I want the uploaded file to be owned by another system user (mylocaluser). I added my virtual user this way :

pure-pw useradd uploadimages -u mylocaluser -d /var/www/mysite/current/images
5

Pure-FTPD has something like MYSQLGetUID and MYSQLGetGID for specifying queries to get UID/GID. Depending on your mysql table you can use something like this:

MYSQLGetUID    SELECT Uid FROM ftpd WHERE User="\L" AND status="1"
MYSQLGetGID    SELECT Gid FROM ftpd WHERE User="\L" AND status="1"

under the MYSQLGetPW query definition. More info in documentation fo Pure-FTPD, section MySQL authentication


OK, my bad I didn't read carefully that you're using PureDB to store users. After you create user you can modify it's info like this:

pure-pw usermod uploadimages -u UID -g GID

then check with pure-pw show uploadimages if the UID/GID are correct.

  • Thks! I was using -u mylocaluser and it seems to work better with the UID. OR maybe you have to provide a group GID too. – Jérémie Aug 27 '12 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.