At the beginning of this year, several of us joined hands to build a high-definition portal website.
Considering that we are positioned in a vertical portal website and the security and stability issues, we chose a linux host that we are not familiar with. The system is centos5.2.
Since we had no contact with centos before, we were overwhelmed when we got started. There are a lot of questions about how to log on, how to install software, and how to configure Server Security.
Fortunately, with the development of Internet technology, we have successfully solved all the above problems through search engines.
I thought it would be so smooth until the website began to operate.
Who knows that tiangong is not beautiful, and there is a problem during website upload. The ftp upload account upload does not have the write permission under the/var/www directory, which directly causes the website program to be unable to upload.
I thought that ssh remote software could be used to change the attributes of the folder, but the folder below could not be inherited.
No way. I don't know anything about centos. I only need to turn to the search engine.
Google found the usage of the chmod command on Baidu. The specific usage is as follows:
Chmod [-cfvR] [-- help] [-- version] mode file...
Parameters:
Mode: permission setting string in the following format: [ugoa...] [[+-=] [rwxX]...] [,...], where
U indicates the owner of the file, g indicates that the owner of the file belongs to the same group, o indicates that the owner of the file belongs to other people, and a indicates that all three are.
+ Adds a permission,-Indicates canceling the permission, and = indicates a unique permission.
R indicates that the file can be read, w indicates that the file can be written, and x indicates that the file can be executed only when the file is a subdirectory or the file has been set to executable.
-C: if the permission of the file has been changed, the change action is displayed.
-F: Do not display an error message if the file permission cannot be changed.
-V: displays details of permission changes.
-R: Change the permissions of all files and sub-directories in the current directory in the same way (that is, change one by one in the way of delivery)
-- Help: displays auxiliary instructions
-- Version: displays the version.
After a series of experiments, I finally found that no matter how I got it, I was confused. What should I do? Is it because our cloud eye Entertainment (NVDCHINA.com) died here? Joke.
Suddenly, when I first configured the server, I installed a graphical interface tool webmin because I was not used to centos commands. This software can execute the vast majority of centos commands in graphical mode. The installation method is as follows:
Log on to the official Webmin download Website:
Http://www.Webmin.com/download.html
Select the following rpm installation format:
Webmin-1.441-1.noarch.rpm
Install Webmin as follows:
[Root @ localhost opt] # lsWebmin-1.410-1.noarch.rpm [root @ localhost opt] # rpm-ivh Webmin-1.410-1.noarch.rpmPreparing... ######################################## ### [2, 100%] Operating system is CentOS Linux1: webmin ####################################### #### [2, 100%] Webmin install complete.
Reference content is as follows:
At that time, I thought of the Software. Well, since most of the commands can be executed, the permission modification should not be a problem.
So I logged on to the webmin background to search for them .. Finally, I found the other/software manager column and clicked it.
As a result, it requires me to install Java.
Forget it. For the sake of our cloud eye entertainment, you can just install it ..
I went to the java official website to install the SDK smoothly and went to the File Manager.
This shows that webmin is really user-friendly. Go to the/var directory, select the www folder and click Properties. The following dialog box is displayed:
Everything is no longer simple. The permission inheritance problem will be solved when you hook up the group writing and change the application to the local directory and Its subdirectories.