pure ftpd : how to set owner on files uploaded
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
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
debian pure-ftpd
add a comment |
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
debian pure-ftpd
add a comment |
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
debian pure-ftpd
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
debian pure-ftpd
debian pure-ftpd
edited Mar 18 at 3:09
Rui F Ribeiro
42.1k1484142
42.1k1484142
asked Aug 23 '12 at 12:41
JérémieJérémie
184
184
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f46161%2fpure-ftpd-how-to-set-owner-on-files-uploaded%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
add a comment |
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
add a comment |
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.
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.
edited Aug 26 '12 at 13:13
answered Aug 26 '12 at 13:06
DawidDawid
18316
18316
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
add a comment |
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
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
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
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f46161%2fpure-ftpd-how-to-set-owner-on-files-uploaded%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown