Why is /public_html a socket?

March 21, 2016 501 views
Deployment DigitalOcean Ubuntu

Why is my /public_html a socket? I can't find any documentation, nor have I found anything via general Google searches? My droplet uses Ubuntu.

  • I am not aware of any software that would create a public_html directory in / as a part of normal operation. What software are you running or trying to configure?

    By default, the two major web server packages use the following web root directories:

    Apache2: /var/www/html
    Nginx: /usr/share/nginx/html

  • best guess is that the user may be using some kind of "pre-made" droplet that has the /public_html directory?

  • If it was a directory, it would make sense. However, it is not a directory -- it is a socket. ls -l shows the "s" as the file type. The date on the socket is the date I set up the droplet 2 years ago. I actually haven't used the droplet for anything in that time, but now I am going to start setting it up. I noticed this file (socket) and it is not something I have ever heard of nor found any other information on.

  • Here (for example) is part of the ls -l on /:

    drwxr-xr-x  2 root root  4096 Apr 16  2014 opt
    dr-xr-xr-x 82 root root     0 Mar 19 12:21 proc
    srwxr-xr-x  1 root root     0 Apr 19  2014 public_html
    drwx------  7 root root  4096 Mar 20 16:36 root
    drwxr-xr-x 18 root root   640 Mar 21 13:12 run

    The little "s" means socket. I know what sockets are for in general, I just don't know what this one is for, or why it is there, etc.

  • ah ok, interesting to know. Well, you may want to try "lsof" if you haven't already. It seemed to have isolated that the mysql.sock socket file on my droplet is associated with mysql, so it may work for you.

Be the first one to answer this question.