NEXUCOM - Support / Knowledge Base


Email to friend
* Your name:
* Your email:
* Friend's email:
Comment:


I've deleted /home, how do I recreate the directories? [DirectAdmin]

Generally, this isn't the best thing to have happen because all of the data is stored there. You'll need to recreate all of the directory structures, as well as a few files required for DA to run:

1) Create the DA tmp directory so you can log into DA again:

 

mkdir -p /home/tmp
chmod 1777 /home/tmp

 


2) Create the /home/username directories and subdirectories:
 

cd /home
vi make_dirs.sh

 


Press 'i' to go into "insert mode" then paste the following script (right click)

 

#!/bin/sh
for i in `ls /usr/local/directadmin/data/users`; do
{
 for d in `cat /usr/local/directadmin/data/users/$/domains.list`; do
 {
  mkdir -p /home/$/domains/$/public_html/cgi-bin
  mkdir -p /home/$/domains/$/private_html
  mkdir -p /home/$/domains/$/public_ftp
  mkdir -p /home/$/domains/$/stats
  mkdir -p /home/$/domains/$/logs
 };
 done;
 mkdir -p /home/$/backups

 chown -R $i:$i /home/$
 chmod -R 755 /home/$
};
done;
exit 0;



Press "ctrl-c" to exit "insert mode", then press "shift-Z" twice to save and exit. Once the file is saved, type:

 

chmod 755 make_dirs.sh
./make_dirs.sh





RSS

Services d'Hébergement: Hébergement Web | Serveurs Dédiés | Streaming | Colocation Serveurs | Nom de Domaine | Support |

Hosting Services: Web Hosting | Dedicated Servers | Streaming | Servers Colocation | Domain Name | Support |

Services: | Hébergement | Serveurs | Colocation |

Copyright © 2003-2008. NEXUCOM, All Rights Reserved.

Mascot - Mascots - DirectAdmin - big - mf - Boiler Biomass - Mascottes - Mascots - Webmail - gt - Chaudière Biomasse - Mascottes - Mascotte -

statistics