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

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/${i}/domains.list`; do
 {
  mkdir -p /home/${i}/domains/${d}/public_html/cgi-bin
  mkdir -p /home/${i}/domains/${d}/private_html
  mkdir -p /home/${i}/domains/${d}/public_ftp
  mkdir -p /home/${i}/domains/${d}/stats
  mkdir -p /home/${i}/domains/${d}/logs
 };
 done;
 mkdir -p /home/${i}/backups

 chown -R $i:$i /home/${i}
 chmod -R 755 /home/${i}
};
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

 
troubleshooting/delete.txt · Last modified: 2010/02/20 04:10 by muscardin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Please visit Automatic Backlinks to start earning free backlinks Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki medrol