using 2nd HD for 1 user

sander815

Verified User
Joined
Jul 29, 2003
Messages
422
i wanted to use a 2nd HD for a user that uses very much HD space
can i just symlink public_html to a dir on that 2nd HD?
If so, what command do i use?
 
Yes.

Once you've mounted the second drive you just do a normal link to it.

WARNING: the example below is untested. Try it at your own risk after making suitable backups.

For example, you can mount the drive as /mnt/username-public_html.

Then navigate to user's main directory:
Code:
cd /home/username
Remove the existing link to public_html:
Code:
rm public_html
Create a new link from public_html to the second drive:
Code:
ln -s /mnt/username-public_html public_html
Navigate to example.com's main directory:
Code:
cd domains/example.com
Move the contents from the user's public_html directory to the new directory:
Code:
mv public_html/* /mnt/username-public_html
Remove the now empty public_html directory:
Code:
rmdir public_html
Create a link to the second drive to replace the old public_html directory
Code:
ln -s /mnt/username-public_html public_html
Jeff
 
thx, that worked ok

i only want to chmod the dir on the 2nd hd, but i get this:
Code:
[root@srv2 backup]# chmod 777 test
chmod: changing permissions of `test' (requested: 0777, actual: 0755): Operation not permitted
[root@srv2 backup]#

whys that?
same with chown
 
sander815 said:
Code:
[root@srv2 backup]# chmod 777 test
chmod: changing permissions of `test' (requested: 0777, actual: 0755): Operation not permitted
[root@srv2 backup]#

whys that?
same with chown
I don't know :( .

Can you post the output of "pwd" just before you run that command?

And also the output of "ls -al"

Jeff
 
Code:
[root@srv2 backup]# pwd
/mnt/backup
[root@srv2 backup]# chmod 777 hent/
chmod: changing permissions of `hent/' (requested: 0777, actual: 0755): Operation not permitted
[root@srv2 backup]#
Code:
[root@srv2 backup]# ls -al
total 20
drwxr-xr-x    5 root     root         4096 Dec 31 19:16 .
drwxr-xr-x    4 root     root         4096 Dec 31 17:20 ..
drwxr-xr-x    4 root     root         4096 Dec 31 17:42 hent
drwxr-xr-x    2 root     root         4096 Dec 31 19:16 test
[root@srv2 backup]#
 
What kind of partition is it?

You can't change permissions on either NFS drives or on FAT drives.

Please show us the output of:

cat /etc/fstab

Jeff
 
Back
Top