LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-21-2004, 08:56 PM   #1
chpchai
LQ Newbie
 
Registered: May 2004
Location: HK
Distribution: RHEL3.0
Posts: 6

Rep: Reputation: 0
vsftpd - Cannot resolve symbolic link in browser


I get a problem that I set a symbolic to a folder in a user directory, but I can't see the linked folder using IE6, while I can see and go into the linked folder using ftp client, like cute ftp. Do anyone has the same experience before???
 
Old 05-21-2004, 10:47 PM   #2
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
It's the way IE interprets the symlink. You would be better off just using connad line instead of IE. You may want to try Firefox or Opera or Netscape if you insist on using a browser.
 
Old 05-22-2004, 02:49 AM   #3
chpchai
LQ Newbie
 
Registered: May 2004
Location: HK
Distribution: RHEL3.0
Posts: 6

Original Poster
Rep: Reputation: 0
My ftp is open to my friends, and they usually use browser (mostly IE) for ftp. So, I can't escape for that.

Is there any work around?

I know that using "mount --bind" to mount the share folder in user home directory works. But if I mount the folder for every user, it results in many mounts (i guess at least 40), will it post a problem for so many "mounts"???
 
Old 05-22-2004, 01:31 PM   #4
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
Here is what I do for the folks I let use my FTP server, I make their home dir the folder I want to share, /ftp in my case. I have a dir named Upload under it where they can upload to but not read from, all other folders they can read from but not write to. Permissions look like this:

-(/ftp:#)-> ll
total 224
drwxr-xr-x 3 root root 4096 Jan 14 2003 10000 Maniacs
drwxr-xr-x 3 root root 4096 Jul 2 2003 Allman Brothers
[SNIP - too many directories to list here...]
drwxr-x-wt 4 root root 4096 May 21 17:35 Uploads
drwxr-xr-x 3 root root 4096 May 21 17:35 Utilities
drwxr-xr-x 3 root root 4096 Jan 14 2003 Warren Haynes
drwxr-xr-x 4 root root 4096 Jan 14 2003 Widespread Panic

Note the permissions on the Uploads folder. They can upload but can't see anything in the dir, even stuff they uploaded. The users have a login shell of /dev/null so they can only login to FTP, never ssh or even locally. All dirs and files under /ftp are owned by root with mode 755 set. All home dirs for FTP users are set to /ftp. I also chroot all ftp users in the /etc/ vsftpd.chroot_list file. This prevents users from walking the tree and seeing things they should not. After the first login of each user, there will be some hidden files created in /ftp that can be safely deleted.
 
Old 05-23-2004, 08:28 PM   #5
chpchai
LQ Newbie
 
Registered: May 2004
Location: HK
Distribution: RHEL3.0
Posts: 6

Original Poster
Rep: Reputation: 0
In your case, all user directories are in the /ftp folder, that means one user can see others home directories name, right? If yes, I think it is not desirable for browsing. If NO, could you tell me how to do that?

Also, I would like to know how to make a user to login the first directory to /ftp instead of their home directory??
 
Old 05-23-2004, 10:38 PM   #6
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
As I said, when I create a user, I set their home dir to /ftp. Everyones home dir is /ftp. They can only download from all folders under /ftp except for the folder named Uploads. Everyone sees the exact same dir structure and the exact same files. I set it up for music/file sharing, not as a playground for people to learn Linux in. I set it up to be as secure as possible for me...
 
Old 05-23-2004, 10:40 PM   #7
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
P.S. if user is in chroot file, they go to their home dir (/ftp) and can not walk up the directory tree. They should go to thier home dir on login, even if not chrooted.
 
Old 05-24-2004, 02:11 AM   #8
chpchai
LQ Newbie
 
Registered: May 2004
Location: HK
Distribution: RHEL3.0
Posts: 6

Original Poster
Rep: Reputation: 0
My situation is a little bit different from yours., as I allow some of the users to have private storage and host website in my server, that I cannot set all user home dir to /ftp. Do u have any suggestion for me?

What I am really want to do is:
1) Some of the users have their own private dir
2) Some of the users have a dir for website
3) There maybe a few group of users, for each group they have a group level sharing dir
4) A public sharing dir for all

Can a user get access to all these with only one login???
 
Old 05-24-2004, 08:13 AM   #9
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
Sure it can be done. This is Linux! Anything is possible.

It's just a question of setting rights on the directories/files. All users will go to home dir (/home/user1) when logging in. They can then walk the dir structure to whatever they have rights to, ie. /var/www/html/mywebserver or /var/group1-sharedfiles or /tmp/everyone-share. You need to set permisions on a user level for private user dirs/files and group membership for shared dirs/files. Read this article for an overview.
 
Old 05-24-2004, 08:20 AM   #10
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
This is a vsFTP how-to that may help. Here is the FAQ from the vsftp homepage.
 
Old 05-25-2004, 03:47 AM   #11
chpchai
LQ Newbie
 
Registered: May 2004
Location: HK
Distribution: RHEL3.0
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by TheOther1
Sure it can be done. This is Linux! Anything is possible.

It's just a question of setting rights on the directories/files. All users will go to home dir (/home/user1) when logging in. They can then walk the dir structure to whatever they have rights to, ie. /var/www/html/mywebserver or /var/group1-sharedfiles or /tmp/everyone-share. You need to set permisions on a user level for private user dirs/files and group membership for shared dirs/files. Read this article for an overview.
I know that its possible to do that. However, what I really want to do is when a user log in, he can get to all the dir in only one click instead of browsing the dir tree, what I am thinking to set is sth like this:

login
=> /userhome/private_dir
=> /userhome/public_ftp_shared_dir
=> /userhome/user_web_folder
=> /userhome/group_share_folder

At the beginning, what i want to do is make a soft link "/userhome/public_ftp_shared_dir" to the ftp folder, but the IE can't see that...

can you give me any suggestion of my directory structure?
 
Old 05-25-2004, 05:01 PM   #12
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
Have you tried hard links or always smylinks?
 
Old 05-26-2004, 07:48 PM   #13
chpchai
LQ Newbie
 
Registered: May 2004
Location: HK
Distribution: RHEL3.0
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by TheOther1
Have you tried hard links or always smylinks?
I have tried using smylinks with the commmand "ln -s xxx xxx", but the IE can't display it.

haven't tried hard links , is it can applied to folders??

also, what is "always symlinks"?
 
Old 05-26-2004, 11:07 PM   #14
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
Quote:
also, what is "always symlinks"?
I meant were the links symlinks, never hardlinks. Try man ln or info ln for link info.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
cmd to resolve symbolic links ttilt Linux - Software 3 08-01-2010 08:17 AM
What is a Symbolic Link? little_penguin Linux - Software 2 05-14-2005 09:27 AM
Symbolic link? jasone Linux - Newbie 4 05-06-2005 07:55 AM
help with a symbolic link mykrob Linux - Software 6 11-22-2004 10:01 AM
Symbolic Links with VSFTPD corpus_delicti Linux - Networking 9 11-16-2003 11:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:33 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