LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-01-2009, 08:13 PM   #1
zardari7
LQ Newbie
 
Registered: Jul 2009
Posts: 11

Rep: Reputation: 0
How to mount a folder to public_html


OK here is my problem.

With cpanel I created an account website.

the location to that website public_html in my server is:

/home/website/public_html/

Now on the same server I have another hard drive which is on /hdd2/

I have a folder there which is /hdd2/gallery/

Now my question is.

I want to mount the public_html to the /hdd2/gallery/

so that /hdd2/gallery/ is treated as public_html for the "website" account.

I am pretty new with linux.

I am runnin centos on the server.


So what exactly is the command I type to get this done.

Please give example using the paths I specified.

and after I mount, do I run chown aswell?

Let me know.

Thanks a lot.
 
Old 07-01-2009, 08:42 PM   #2
jeromeNP7
Member
 
Registered: Jun 2009
Posts: 101

Rep: Reputation: 19
Quote:
I want to mount the public_html to the /hdd2/gallery/
so that /hdd2/gallery/ is treated as public_html for the "website" account.
The above request is a bit contradicting. And even beyond that, you can only mount devices or files with an internal filesystem, but not directories on a device. You rather want to use softlinks, I guess.

Reasonable options:

1. mount /dev/hdd2 on top of /home/website/public_html/, so that /home/website/public_html/gallery/ has the content

2. make /home/website/public_html/ a softlink to /hdd2/gallery/, so that /home/website/public_html/ leads to /hdd2/gallery/

Mounting:
mount -t ext3 /dev/hdd2 /home/website/public_html/
(will hide original contents of /hdd2/gallery/)

Softlinking:
ln -s /hdd2/gallery/ /home/website/public_html/
(must delete public_html directory before creating a softlink with that name)

Linux

Last edited by jeromeNP7; 09-04-2009 at 09:07 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
How can I point a users public_html to a folder on a webserver outside the firewall? Durham Linux - Networking 5 05-13-2006 03:36 AM
"Mount" a folder into my ftp folder ? 0001001 Linux - General 3 11-27-2005 04:23 AM
mount samba folder alaios Linux - Networking 2 07-23-2005 03:14 PM
/Public_html Folder....what is it? ZingSter SUSE / openSUSE 3 10-21-2004 05:02 PM
Making it so users can ftp into there Public_html folder embalmedlenin Linux - General 4 12-13-2003 06:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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