Results 1 to 3 of 3
I believe I'm close to my goal. But I'm missing something.
I know how to create users, to access their apache directories. My problem is creating 2 or more users ...
- 07-13-2009 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 3
FTP (vsftpd) users config question
I believe I'm close to my goal. But I'm missing something.
I know how to create users, to access their apache directories. My problem is creating 2 or more users to access the same directory - and have permissions to modify files with their ftp clients.
So far, multi-user accounts can view the same directory, but they cannot upload anything.
Here's the breakdown of what I've done.
1. I've chown'd apache.apache to the directory I am using: /var/www/html/mysite.com
#chown -R apache.apache /var/www/html/mysite.com/
2. I created 2 new ftp users, and :
#useradd george -d /var/www/html/mysite.com/
#useradd johnny -d /var/www/html/mysite.com/
3. Added the new users in the chroot_list
#vi /etc/vsftpd.chroot_list
4. Ensured the new users only have specific access to /var/www/html/mysite.com/
#vi /etc/passwd
george: x :558:559::/var/www/html/mysite.com:sbin/nologin
johnny: x :559:560::/var/www/html/mysite.com:sbin/nologin
(as I understand "sbin/nologin" ensures this)
5. I assigned the new users to the apache group
#vi /etc/group
apache: x :48:root,george,johnny
6. restarted the service
#service vsftpd restart
So far, everythings good to go, except I cannot modify files with these new users. But, I can see all the files just fine.
Do I have a missing step somewhere? Does something need to be changed in the vsftpd.conf file?
Any help would be awesome!
thanksLast edited by msteele; 07-13-2009 at 08:18 PM. Reason: had to change :x to non-emoticon format
- 07-13-2009 #2
Please run this and post the output:
Code:ls -al /var/www/html/mysite.com/
Jaysunn
- 07-17-2009 #3Just Joined!
- Join Date
- Jul 2009
- Posts
- 58
1. sbin/nologin is not a valid shell -- check /etc/shells to make sure it is listed and it actually exists. /sbin/nologin is probably what you want.
[[ The following is a bit advanced, so don't try it unless you know what each command does ]]
2. if there is nobody else accessing that directory you need to add the group permission to that directory:
# find /var/www/html/mysite.com -type d chmod -R g+rwx {} \;
# find /var/www/html/mysite.com -type f chmod -R g+rw {} \;
That will give the group permissions over the directory and group. To make sure all of the new files have group permissions you should set a sticky bit:
# chmod g+s /var/www/html/mysite.com
I hope that helps.


Reply With Quote