LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-20-2010, 01:12 AM   #1
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271
Blog Entries: 7

Rep: Reputation: 18
ftp user


hi,

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.
 
Old 03-20-2010, 02:09 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
1 members found this post helpful.
Old 03-22-2010, 02:09 AM   #3
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271

Original Poster
Blog Entries: 7

Rep: Reputation: 18
hi,

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.

thanks in advance,
Dinesh.
 
Old 03-22-2010, 09:51 AM   #4
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271

Original Poster
Blog Entries: 7

Rep: Reputation: 18
hi,

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.
 
Old 03-24-2010, 11:39 PM   #5
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271

Original Poster
Blog Entries: 7

Rep: Reputation: 18
hi,

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp user can't create a directory on ftp server bharatlalgupta Red Hat 4 01-27-2010 01:58 PM
[SOLVED] vsftpd: FTP clients work, ftp://xxxx in mozilla does not. Anonymous user prob? arashi256 Linux - Server 8 01-13-2010 09:31 AM
Anonymous FTP for all, user FTP logins only for specific IP ranges Sjorrit Slackware 15 04-24-2009 02:32 PM
Unable to FTP as user but can FTP as Root acharya_rl Linux - Enterprise 5 09-05-2006 06:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration