Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Jul 28, 2010 4:34 pm 
Offline
Senior Newbie

Joined: Wed Jul 28, 2010 4:22 pm
Posts: 5
I have set up virtual hosts in apache2 with the site root located at /srv/www/domain.com/public_html as described in http://library.linode.com/lamp-guides/ubuntu-10.04-lucid/

I have set up a new user with a home directory of /home/username

I have then setup an sftp jail as described here http://library.linode.com/networking/security-guides/linux-sftp-jail

I then created a symlink via

Code:
cd /home/username

Code:
ln -s /srv/www/domain.com/public_html


When ssh'd in to the server I can
Code:
cd /home/username/public_html

and I can see the files.

If I then try to sftp in to the user I can see an alias to public_html but when I double click on the alias I get the following error "Could not resolve symlink “public_html”."

Any ideas?


Top
   
PostPosted: Wed Jul 28, 2010 4:57 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
Should be....
Code:
ln -s /srv/www/domain.com/public_html /public_html


Top
   
 Post subject:
PostPosted: Wed Jul 28, 2010 5:06 pm 
Offline
Senior Newbie

Joined: Wed Jul 28, 2010 4:22 pm
Posts: 5
Hi,

Thanks for taking the time to reply. I removed the symlink I created and followed your instructions and I get the same result as described before

Cheers


Top
   
 Post subject:
PostPosted: Wed Jul 28, 2010 5:12 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
Did you set the permissions (change ownership) for that user for that /public_html directory?


Top
   
 Post subject:
PostPosted: Wed Jul 28, 2010 5:13 pm 
Offline
Senior Newbie

Joined: Wed Jul 28, 2010 4:22 pm
Posts: 5
Do you mean:-

chown user:user /home/user/public_html

or

chown user:user /srv/www/domain.com/public_html


Top
   
 Post subject:
PostPosted: Wed Jul 28, 2010 5:22 pm 
Offline
Senior Newbie

Joined: Wed Jul 28, 2010 4:22 pm
Posts: 5
I tried both and neither worked. Any other ideas


Top
   
 Post subject:
PostPosted: Wed Jul 28, 2010 5:35 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
The first - the second Fubar's your web service.


Top
   
 Post subject:
PostPosted: Wed Jul 28, 2010 5:42 pm 
Offline
Senior Newbie

Joined: Wed Jul 28, 2010 4:22 pm
Posts: 5
I have been told because it is a jailed sftp i won't be able to symlink out of the jail. I have moved the public_html in to the home folder


Top
   
 Post subject:
PostPosted: Wed Jul 28, 2010 6:57 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
harveyd wrote:
I have been told because it is a jailed sftp i won't be able to symlink out of the jail. I have moved the public_html in to the home folder


Sounds about right, if you're serving clients and letting them sftp into your server it's easier to lock them down to their home directory so stick all their web stuff in there.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group