Centos HELP
#1

hello everyone i;m trying to create another ftp account so it have only access to /var/www/html/ folder
but i can't figure on how to do that?
can anyone help me
Reply
#2

Well really you have two options, you could change your default apache directory to a new users home area (/home/username) and when they connect via ftp it would put them into that directory.

You can use this site to install VSFTPD which is a FTP server for UNIX systems. Ignore the steps regarding installing the FTP client on your remote machine, since you would probably be doing that from a client such as FileZilla.

Or on the other hand, you could use webmin to manage your CentOS server, and through this online panel you can choose to add extra apache zones, and add new users to change their home directory.

Feel free to PM me if you'd like anymore help!
Reply
#3

you know i've created an user account
and whenever i open FTP on filezilla via that new account
it opens the /home directory
i want it to open /var/www/html directory and only that directory
so that user can't go back and mess with other files.
Reply
#4

Use this command,
Код:
usermod -m -d /var/www/html YOURUSERNAME
just use that via SSH and it should take effect.

-Connor
Reply
#5

Do the following:

Код:
# useradd -d /var/www/html ftp-uname-here
A user should be created. Then do this:

Код:
# passwd ftp-uname-here
And set the password for the user.

Then make sure you do this, or the directory will not be writable for the user:

Код:
# chown -R ftp-uname-here /var/www/html
Make sure to replace ftp-uname-here with the username you want to use FTP with.

When this is done, log into FTP using the username and password of the user you just created!

Good luck.

EDIT: I thought I'd add an example...

Код:
# useradd -d /var/www/html webftp
# passwd webftp
New password: fluffs
# chown -R webftp /var/www/html

#
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)