LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-02-2002, 02:29 AM   #1
allancondino
LQ Newbie
 
Registered: Apr 2002
Posts: 7

Rep: Reputation: 0
FTP exclusive directory access


Hi,

I have a RH 6.2 running. I have created a directory /home/httpd/webpage where i have my web files.

I use the command chown webmaster.webmaster /home/httpd/webpage to change ownership of the directory.

But when i FTP to this directory using user webmaster i am only allowed for read-only.

Any help on how i can setup my webpage directory to be exclusive for user webmaster with read-write persmission?
 
Old 05-02-2002, 02:46 AM   #2
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 46
To give the user write permissions on the filesystem level use the following command:
chmod u+w /home/httpd/webpage

I don't know which ftp server but with some there are extra directives in the ftp configuration files to block writes in certain directories. But you should be able to find more about that in the documentation of the ftp server you are using.
 
Old 05-02-2002, 03:02 AM   #3
allancondino
LQ Newbie
 
Registered: Apr 2002
Posts: 7

Original Poster
Rep: Reputation: 0
exclusive for a specific directory

Hi Mik,

Thanks for prompt reply. I think the command will work with my RH 6.2. I actually use the chown instead to change ownership thus completely giving write access to my webmaster user.

But one more thing. Hope it's not too much to ask. How can i setup the 'webmaster' FTP access exclusively accessing my /home/httpd/webpage directory. Meaning, when the user use the FTP client, the user can only see /. User should not be able to see other files or directories except /home/httpd/webpage files and it's subdirectories.

Thanks again.
 
Old 05-02-2002, 06:15 AM   #4
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 46
The chown just changes the owner of the file. When you specify chown user.user filename. Then you change the user and group. The chmod command is used to change permissions for either user, group or other (ugo). So the command chmod u+w would give the user permission to write. But you should read the man pages on chown and chmod to understand exactly how they work.

Usually the best way would be to use a chroot jail. I don't know which ftp server you are using. But the most popular ftp servers have documentation on how to get this done.
Proftpd does it using a DefaultRoot derictive which doesn't offer as much security as a chroot jail but it makes setting the process up a lot easier and for most people this is enough.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically Copying files from the ftp directory into the html directory swatward Linux - General 3 04-17-2005 10:55 PM
Samba access by Windows users locking out directory access with Konqueror harry_fine Suse/Novell 1 12-18-2004 05:33 AM
I lose ftp access when I disable shell access for user captainObvious Linux - General 3 11-13-2004 05:49 PM
RW access to a directory via FTP using ProFTPD borbzz Linux - Software 4 05-11-2004 10:23 PM
Guy got root directory access from my FTP server... how can I fix this? bripage Linux - General 16 10-02-2002 10:12 AM


All times are GMT -5. The time now is 11:33 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration