How to Create a public_html Folder on Linux | Linux Apache | Linux public_html Permissions
Chmod public_html Advice
How to set up a public_html folder on linux, and commands to set chmod (Permissions).
Create public_html folder
Each user beneath the root of the Linux server has a space on the server called the “home” directory. This is located at /home. It is necessary to create a foler called public_html in this folder. This is where the *.html and *.php files will be stored and accessed from FTP and HTTP clients.
The command to create this folder is as follows: Type the following code into the terminal.
]$ cd /home
]$ mkdir public_html
Great Books For Beginners.
Set Permissions Linux
After the folder has been created the permissions have to be set.
- Owners can read, write and execute
- Groups can only read and execute
- Others can only read and execute
The decimal value for this is 755.
The command to change the permissions of public_html to this is as follows:
]$ chmod public_html 755
The key terminal command here is 755. It is also necessary to set permissions on files within the FTP, this can be done in a windows graphical user interface accessing the Linux server via an FTP client.