Setting up Apache with multiple FTP users and vsftpd
I'm trying to get my Apache setup with a single user 'ftpuser' both be able to share/access the /var/www/html
directory, which contains various files/sub directories. However, when I log in via FTP under 'ftpuser,' everything is empty and I can't upload anything. Here is what I followed to do this:
Setting up VSFTPD permissions with Apache server
which outlined the steps:
- set up vsftpd for umask 0027 (
/etc/vsftpd.conf
) [local_umask=0027] - create www group (groupadd www)
- add user to group (
usermod -a -G www apache
and same command with www ftpuser) - Set apache to run as www group (httpd.conf)
chgrp www /var/www
chmod 2775 /var/www
I restarted Apache/vsftpd after all of this. However, when I try to FTP in, the directory is blank and if I try to create a file, it says, "Could not start data transfer." I'm assuming this is a permission denied error.
I also edited the /etc/passwd
file and changed the home directory to /var/www/html
. Could someone shed some light as to what the issue is? Thanks.
EDIT:
In case anyone else has this issue, the problem was that selinux had been disabled, but wasn't actually disabled. It needed to be restarted before it was disabled and was no longer locking down the home directories. If you want to keep selinux enabled, use the below command:
setsebool -P ftp_home_dir on
Hope that helps someone.
permissions centos apache-http-server ftp vsftpd
add a comment |
I'm trying to get my Apache setup with a single user 'ftpuser' both be able to share/access the /var/www/html
directory, which contains various files/sub directories. However, when I log in via FTP under 'ftpuser,' everything is empty and I can't upload anything. Here is what I followed to do this:
Setting up VSFTPD permissions with Apache server
which outlined the steps:
- set up vsftpd for umask 0027 (
/etc/vsftpd.conf
) [local_umask=0027] - create www group (groupadd www)
- add user to group (
usermod -a -G www apache
and same command with www ftpuser) - Set apache to run as www group (httpd.conf)
chgrp www /var/www
chmod 2775 /var/www
I restarted Apache/vsftpd after all of this. However, when I try to FTP in, the directory is blank and if I try to create a file, it says, "Could not start data transfer." I'm assuming this is a permission denied error.
I also edited the /etc/passwd
file and changed the home directory to /var/www/html
. Could someone shed some light as to what the issue is? Thanks.
EDIT:
In case anyone else has this issue, the problem was that selinux had been disabled, but wasn't actually disabled. It needed to be restarted before it was disabled and was no longer locking down the home directories. If you want to keep selinux enabled, use the below command:
setsebool -P ftp_home_dir on
Hope that helps someone.
permissions centos apache-http-server ftp vsftpd
add a comment |
I'm trying to get my Apache setup with a single user 'ftpuser' both be able to share/access the /var/www/html
directory, which contains various files/sub directories. However, when I log in via FTP under 'ftpuser,' everything is empty and I can't upload anything. Here is what I followed to do this:
Setting up VSFTPD permissions with Apache server
which outlined the steps:
- set up vsftpd for umask 0027 (
/etc/vsftpd.conf
) [local_umask=0027] - create www group (groupadd www)
- add user to group (
usermod -a -G www apache
and same command with www ftpuser) - Set apache to run as www group (httpd.conf)
chgrp www /var/www
chmod 2775 /var/www
I restarted Apache/vsftpd after all of this. However, when I try to FTP in, the directory is blank and if I try to create a file, it says, "Could not start data transfer." I'm assuming this is a permission denied error.
I also edited the /etc/passwd
file and changed the home directory to /var/www/html
. Could someone shed some light as to what the issue is? Thanks.
EDIT:
In case anyone else has this issue, the problem was that selinux had been disabled, but wasn't actually disabled. It needed to be restarted before it was disabled and was no longer locking down the home directories. If you want to keep selinux enabled, use the below command:
setsebool -P ftp_home_dir on
Hope that helps someone.
permissions centos apache-http-server ftp vsftpd
I'm trying to get my Apache setup with a single user 'ftpuser' both be able to share/access the /var/www/html
directory, which contains various files/sub directories. However, when I log in via FTP under 'ftpuser,' everything is empty and I can't upload anything. Here is what I followed to do this:
Setting up VSFTPD permissions with Apache server
which outlined the steps:
- set up vsftpd for umask 0027 (
/etc/vsftpd.conf
) [local_umask=0027] - create www group (groupadd www)
- add user to group (
usermod -a -G www apache
and same command with www ftpuser) - Set apache to run as www group (httpd.conf)
chgrp www /var/www
chmod 2775 /var/www
I restarted Apache/vsftpd after all of this. However, when I try to FTP in, the directory is blank and if I try to create a file, it says, "Could not start data transfer." I'm assuming this is a permission denied error.
I also edited the /etc/passwd
file and changed the home directory to /var/www/html
. Could someone shed some light as to what the issue is? Thanks.
EDIT:
In case anyone else has this issue, the problem was that selinux had been disabled, but wasn't actually disabled. It needed to be restarted before it was disabled and was no longer locking down the home directories. If you want to keep selinux enabled, use the below command:
setsebool -P ftp_home_dir on
Hope that helps someone.
permissions centos apache-http-server ftp vsftpd
permissions centos apache-http-server ftp vsftpd
edited Mar 20 '17 at 10:17
Community♦
1
1
asked Aug 16 '13 at 4:02
Brian MannopoBrian Mannopo
613
613
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
This is a lot more likely to be a "Protocol" or "Firewall" error then a password error. You may want to try changing between active and passive mode, and also see what happens if you attempt to FTP from the box the FTP server is running on on "Localhost" to rule out errors in the firewall.
Also, although I don't use VSFTP, you will almost certainly it has a log file. If you find the log file it should give you more information about the error (at least if its a password error)
I can verify that I'm able to ftp in, so connecting to the server and password issues can be ruled out: Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> pwd Remote directory: / ftp> It seems to be related to the ownership/permissions and using a group structure, but not sure what exactly.
– Brian Mannopo
Aug 16 '13 at 5:32
Also, this is what the error log shows when I try to create a file: Thu Aug 15 19:37:17 2013 1 94.251.103.180 0 /untitled_file b _ i r ftpuser ftp 0 * i
– Brian Mannopo
Aug 16 '13 at 5:36
add a comment |
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2fsuperuser.com%2fquestions%2f632581%2fsetting-up-apache-with-multiple-ftp-users-and-vsftpd%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
This is a lot more likely to be a "Protocol" or "Firewall" error then a password error. You may want to try changing between active and passive mode, and also see what happens if you attempt to FTP from the box the FTP server is running on on "Localhost" to rule out errors in the firewall.
Also, although I don't use VSFTP, you will almost certainly it has a log file. If you find the log file it should give you more information about the error (at least if its a password error)
I can verify that I'm able to ftp in, so connecting to the server and password issues can be ruled out: Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> pwd Remote directory: / ftp> It seems to be related to the ownership/permissions and using a group structure, but not sure what exactly.
– Brian Mannopo
Aug 16 '13 at 5:32
Also, this is what the error log shows when I try to create a file: Thu Aug 15 19:37:17 2013 1 94.251.103.180 0 /untitled_file b _ i r ftpuser ftp 0 * i
– Brian Mannopo
Aug 16 '13 at 5:36
add a comment |
This is a lot more likely to be a "Protocol" or "Firewall" error then a password error. You may want to try changing between active and passive mode, and also see what happens if you attempt to FTP from the box the FTP server is running on on "Localhost" to rule out errors in the firewall.
Also, although I don't use VSFTP, you will almost certainly it has a log file. If you find the log file it should give you more information about the error (at least if its a password error)
I can verify that I'm able to ftp in, so connecting to the server and password issues can be ruled out: Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> pwd Remote directory: / ftp> It seems to be related to the ownership/permissions and using a group structure, but not sure what exactly.
– Brian Mannopo
Aug 16 '13 at 5:32
Also, this is what the error log shows when I try to create a file: Thu Aug 15 19:37:17 2013 1 94.251.103.180 0 /untitled_file b _ i r ftpuser ftp 0 * i
– Brian Mannopo
Aug 16 '13 at 5:36
add a comment |
This is a lot more likely to be a "Protocol" or "Firewall" error then a password error. You may want to try changing between active and passive mode, and also see what happens if you attempt to FTP from the box the FTP server is running on on "Localhost" to rule out errors in the firewall.
Also, although I don't use VSFTP, you will almost certainly it has a log file. If you find the log file it should give you more information about the error (at least if its a password error)
This is a lot more likely to be a "Protocol" or "Firewall" error then a password error. You may want to try changing between active and passive mode, and also see what happens if you attempt to FTP from the box the FTP server is running on on "Localhost" to rule out errors in the firewall.
Also, although I don't use VSFTP, you will almost certainly it has a log file. If you find the log file it should give you more information about the error (at least if its a password error)
answered Aug 16 '13 at 5:23
davidgodavidgo
44.6k75292
44.6k75292
I can verify that I'm able to ftp in, so connecting to the server and password issues can be ruled out: Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> pwd Remote directory: / ftp> It seems to be related to the ownership/permissions and using a group structure, but not sure what exactly.
– Brian Mannopo
Aug 16 '13 at 5:32
Also, this is what the error log shows when I try to create a file: Thu Aug 15 19:37:17 2013 1 94.251.103.180 0 /untitled_file b _ i r ftpuser ftp 0 * i
– Brian Mannopo
Aug 16 '13 at 5:36
add a comment |
I can verify that I'm able to ftp in, so connecting to the server and password issues can be ruled out: Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> pwd Remote directory: / ftp> It seems to be related to the ownership/permissions and using a group structure, but not sure what exactly.
– Brian Mannopo
Aug 16 '13 at 5:32
Also, this is what the error log shows when I try to create a file: Thu Aug 15 19:37:17 2013 1 94.251.103.180 0 /untitled_file b _ i r ftpuser ftp 0 * i
– Brian Mannopo
Aug 16 '13 at 5:36
I can verify that I'm able to ftp in, so connecting to the server and password issues can be ruled out: Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> pwd Remote directory: / ftp> It seems to be related to the ownership/permissions and using a group structure, but not sure what exactly.
– Brian Mannopo
Aug 16 '13 at 5:32
I can verify that I'm able to ftp in, so connecting to the server and password issues can be ruled out: Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> pwd Remote directory: / ftp> It seems to be related to the ownership/permissions and using a group structure, but not sure what exactly.
– Brian Mannopo
Aug 16 '13 at 5:32
Also, this is what the error log shows when I try to create a file: Thu Aug 15 19:37:17 2013 1 94.251.103.180 0 /untitled_file b _ i r ftpuser ftp 0 * i
– Brian Mannopo
Aug 16 '13 at 5:36
Also, this is what the error log shows when I try to create a file: Thu Aug 15 19:37:17 2013 1 94.251.103.180 0 /untitled_file b _ i r ftpuser ftp 0 * i
– Brian Mannopo
Aug 16 '13 at 5:36
add a comment |
Thanks for contributing an answer to Super User!
- 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%2fsuperuser.com%2fquestions%2f632581%2fsetting-up-apache-with-multiple-ftp-users-and-vsftpd%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