LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache User and Shell Security Question (https://www.linuxquestions.org/questions/linux-newbie-8/apache-user-and-shell-security-question-4175433923/)

Obscurious 10-24-2012 04:59 PM

Apache User and Shell Security Question
 
I just setup a wordpress server running ubuntu. In order to get the pointy-clicky updates to work I had to setup SFTP on the server. I installed vsftpd and opened the port. After forcing encryption I enabled local accounts access to the SFTP server. Since apache serves wordpress I needed to give www-data access to the SFTP server. I set the www-data password, and added /usr/sbin/nologin to the file /etc/shells.

This method works but I am concerned about security:

1) Setting the password on a system account seems like a bad idea. I have SSH locked down via AllowUsers, but I don't know enough to be certain that this didn't open a hole internally. Is this generally a bad idea and is there an alternative approach?

2) I understand that /etc/shells is just a list of users' shells that vsftpd will accept, but I have never come across the nologin shell before. Researching I found that it is a way to refuse logins and thus a way to cordon off system accounts. Hence I feel a little dirty adding access to accounts that we want to not have access. Did I just give every system account access to the SFTP server?

chrism01 10-24-2012 06:44 PM

I'd just like to clarify something.
SFTP is the Secure FTP option within the ssh pkg.
You can alternatively(!) use vsftpd+TLS.
They are however completely unrelated and you (probably) only need one or the other.
Does that help?

jsaravana87 10-25-2012 12:50 AM

Quote:

1) Setting the password on a system account seems like a bad idea. I have SSH locked down via AllowUsers, but I don't know enough to be certain that this didn't open a hole internally. [B]Is this generally a bad idea and is there an alternative approach?
Alternatives solution you can also try vsftpd with virtual user which lock the ftp user to login via ssh .Look after the link

http://www.cyberciti.biz/tips/centos...ual-users.html

Obscurious 10-25-2012 02:26 PM

Quote:

Originally Posted by chrism01 (Post 4814224)
I'd just like to clarify something.
SFTP is the Secure FTP option within the ssh pkg.
You can alternatively(!) use vsftpd+TLS.
They are however completely unrelated and you (probably) only need one or the other.
Does that help?

You are absolutely correct. I need FTP + TLS since wordpress only has FTP capabilities. Thanks.

Obscurious 10-25-2012 05:21 PM

Quote:

Originally Posted by arun5002 (Post 4814363)
Alternatives solution you can also try vsftpd with virtual user which lock the ftp user to login via ssh .Look after the link

http://www.cyberciti.biz/tips/centos...ual-users.html

Wow, this is a really cool feature that I didn't know existed. Thank you!


All times are GMT -5. The time now is 07:21 PM.