Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i configured ftp in my server.i just want to access the web page created in server through ftp.ya i can able to access. but the problem is ,it,s showing all the files and folders of the server like Desktop,Documents etc.....
But its just need to show only the site files such as index.html and its sub folders.
i think the problem is because of logging in to the server through ftp as normal user,which is created in server. so i think if we login as ftp user we can able to access only the website files.
so my question is simple, how to create ftp users.
thanks in advance,
Dinesh.
Last edited by dinakumar12; 03-20-2010 at 01:38 AM.
You've not said a thing about your ftp server, but in general you will have a number of options and it'll depend on things like how many people you want to give access to and how. For the sort of scenario you appear to suggest you would create a new account and then set that users home directory to the ftp location. Then you'd be looking to jail that user account so that they only place they can go is that directory and lower. In vfstpd this is done with the chroor_local_user = yes option in the config file.
i don't know how to describe my ftp server, since i am new to linux.i just configured ftp server and i have also created ftp users. A directory named ftp-docs is created inside home directory automatically. but when i tried to login in to server through ftp by ftp:www.XXXX.com it is asking for user name and password.After providing ftp username and password,it is logging in successfully but displaying the ftp-docs folder.
but it need to show the site files like index.html which is inside /var/www. so how to change this location.
i copied the content of /var/www to ftp-docs.now it's showing the site files when logged through ftp. but the contents modified inside index.html after logging through ftp will not be replicated in /var/www.
can you describe me in detail what you need from me exactly to solve this issue.
my problem had been solved. i gave the following command to change the ftpuser home directory to /var/www where my index.html file is placed.
useradd user2 -p ubuntu -d /var/www -s /bin/false
user2 - ftp username
ubuntu - host name
/var/www - location of index.html file
after executing this command in server i can able to login to the ftpserver from client directly to the location where my website files were placed.
but i have got another problem,while uploading a new file to that location of that website files,after logging in through ftp user,the uploaded file possesses a permission in a manner that the owner has read and write permission,group and others have no permission. but i want that uploaded file to be executed by all,that is 777.
how can i set this permission by default,when a file had been uploaded.
thanks in advance,
Dinesh.
Last edited by dinakumar12; 03-22-2010 at 10:04 AM.
now the files uploaded by logging through ftp user have default permission of 644.this id done by changing the umask value of the ftp user.By default the umask value of ftp user is 077, so i can changed it by editing the configuration file /etc/vsftpd.conf
local_umask = 022
so my problem had been solved.
thanks@regards,
Dinesh.
Last edited by dinakumar12; 03-24-2010 at 11:46 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.