Accidentally deleted public_html and cannot recreate

apipoltung

New member
Joined
Jan 23, 2015
Messages
6
Hi all,

I accidentally deleted the publichtml folder and cannot recreate or rename the folder to be named "public_html"

could you guys help me out please? Thx.
 
Does you have root access to the server? if yes, what error you get when you try to re-create it?

If no, you may need to ask to your hosting provider.

Regards
 
Hi SeLLeRoNe,

Thanks for the reply. I have root access. I tried to create the folder on page CMD_FILE_MANAGER and the folder didn't show up. When I tried creating folder with different name, the folder appears rightaway. Then i tired changing the new created folder name to "public_html" it gives me this :

Unable to move /domain to /public_html:
A component used as a directory in oldpath or newpath is not, in fact, a directory. Or, oldpath is a directory, and newpath exists but is not a directory.


Thank you

Does you have root access to the server? if yes, what error you get when you try to re-create it?

If no, you may need to ask to your hosting provider.

Regards
 
Use root access via SSH using:

mkdir -p /home/USER/domains/DOMAIN/public_html
chown -R USER:USER /home/USER/domains/DOMAIN/public_html

Regards
 
I guess public_html already exists either as a file or a broken symlink. You need check a listing of files more carefully.
 
Hi SeLLeRoNe,

Thanks for your reply. I tried using putty but I keep getting access denied even though I put the correct username and password. I also look up the internet and some forums wanted me to set access for SSH thing. I also uncheck Attemp GSSAPI and it still won't work. I'm quite new to this and have no idea how to. I'm getting super frustrated now. I also have new folder called "domains" UID and GID says "root" instead of my username. I can't add file, change name or add file to it.

Any advise you could give me more? Thanks in advanced.

Cheers,


Use root access via SSH using:

mkdir -p /home/USER/domains/DOMAIN/public_html
chown -R USER:USER /home/USER/domains/DOMAIN/public_html

Regards
 
Hi zEitEr,

Thank for the reply. I look up and there's no such folder. A friend of mine recommend looking up by ftp via Total Commander and I can't find the folder. I can't add or edit anything to it under the name public_html. ...

I guess public_html already exists either as a file or a broken symlink. You need check a listing of files more carefully.
 
Post here results of

Code:
ls -la /home/<USERNAME>
ls -la /home/<USERNAME>/domains/
ls -la /home/<USERNAME>/domains/*
 
Hey, that won't do. You'd better hire SeLLeRoNe or other guys here (including me) to fix it for you. If you aren't familiar with SSH and bash you might get more troubles while trying to fix yourself.
 
Are you trying to log via SSH via root user and you get access denied?

Are you sure root access is enabled? If yes, are you sure your password is correct?

As Alex suggested, i also would suggest you to hire someone to do that for you since root access in a server may be risky to a non-expert person... and you really may create more problems than this simple one.

Best regards
 
Back
Top