After the linux-chmod command is run, the prompt file for installing the php application is still not writable.

Source: Internet
Author: User
I want to install some open-source php applications in my Linux system, such as phpFreeChat. I put it under varwwwhtmlfreechat, then, use the chmod777 command for the public and private folders in the data folder under freechat, and then use ls-aldata... I want to install some open-source php applications in my Linux system, such as phpFreeChat. I put it under/var/www/html/freechat, then, the public and private folders in the data folder under freechat are used. chmod 777Command, and then use ls -al dataCommand to see the result:

Drwxr-xr-x. 4 root 4096 Jun 17 :07.
Drwxr-xr-x. 13 root 4096 Jun 17 :22 ..
Drwxrwxrwx. 2 root 4096 Jun 17 :07 private
Drwxrwxrwx. 3 root 4096 Jun 17 :07 public

However, entering http: // localhost/freechat in the browser will result in the following error:

PhpFreeChat cannot be initialized, please correct these errors:

/Var/www/html/freechat/src/../data/private is not writeable
/Var/www/html/freechat/src/../data/private/cache can't be created
/Var/www/html/freechat/src/../data/private/cache is not writeable
/Var/www/html/freechat/src/../data/private/cache is not readable
Cannot create/var/www/html/freechat/src/../data/public/themes/default
Cannot create/var/www/html/freechat/src/../data/public/themes/default
/Var/www/html/freechat/src/../data/private/chat can't be created
/Var/www/html/freechat/src/../data/private/chat is not writeable
/Var/www/html/freechat/src/../data/private/chat is not readable
/Var/www/html/freechat/src/../data/private/chat/s_d0ba868e1391b6c0d897996049a68ada can't be created
/Var/www/html/freechat/src/../data/private/chat/s_d0ba868e1391b6c0d897996049a68ada is not writeable
/Var/www/html/freechat/src/../data/private/chat/s_d0ba868e1391b6c0d897996049a68ada is not readable

You have also tried the recursive chmod command, and the error persists.

Use code

 

The User name is apache, and then the User and Group are both apache in/etc/httpd/conf/httpd. conf. Is the reason why the display file cannot be written is that this user's settings are incorrect? If so, how can I modify it? If not, what is the problem?

Reply content:

I want to install some open-source php applications in my Linux system, such as phpFreeChat. I put it under/var/www/html/freechat, then, the public and private folders in the data folder under freechat are used.chmod 777Command, and then usels -al dataCommand to see the result:

Drwxr-xr-x. 4 root 4096 Jun 17 :07.
Drwxr-xr-x. 13 root 4096 Jun 17 :22 ..
Drwxrwxrwx. 2 root 4096 Jun 17 :07 private
Drwxrwxrwx. 3 root 4096 Jun 17 :07 public

However, entering http: // localhost/freechat in the browser will result in the following error:

PhpFreeChat cannot be initialized, please correct these errors:

/Var/www/html/freechat/src/../data/private is not writeable
/Var/www/html/freechat/src/../data/private/cache can't be created
/Var/www/html/freechat/src/../data/private/cache is not writeable
/Var/www/html/freechat/src/../data/private/cache is not readable
Cannot create/var/www/html/freechat/src/../data/public/themes/default
Cannot create/var/www/html/freechat/src/../data/public/themes/default
/Var/www/html/freechat/src/../data/private/chat can't be created
/Var/www/html/freechat/src/../data/private/chat is not writeable
/Var/www/html/freechat/src/../data/private/chat is not readable
/Var/www/html/freechat/src/../data/private/chat/s_d0ba868e1391b6c0d897996049a68ada can't be created
/Var/www/html/freechat/src/../data/private/chat/s_d0ba868e1391b6c0d897996049a68ada is not writeable
/Var/www/html/freechat/src/../data/private/chat/s_d0ba868e1391b6c0d897996049a68ada is not readable

You have also tried the recursive chmod command, and the error persists.

Use code

 

The User name is apache, and then the User and Group are both apache in/etc/httpd/conf/httpd. conf. Is the reason why the display file cannot be written is that this user's settings are incorrect? If so, how can I modify it? If not, what is the problem?

After the problem is solved, it turns out that SELinux is stuck in the middle. Usesetenforce 0Then it will be successful.

This is the reason.chown -rf apache.apache /var/www/html/freechat/data/Try

chmod 777 -R /var/www/html/freechat/data

Recursively modify permissions
Or change the directory owner to apache as @ joyqi says.

chown -R apache:apache /var/www/html/freechat

You must remember to setenforce 0 in the Rpm system and temporarily disable selinux before testing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.