Categories
everyday life

桃の節句 (peach festival) passing.

同一記事の日本語版

   The ume (梅) blossoms are still in full bloom in my garden (fig.1 white, fig.2 red), but I can see peach and apricot blossoms here and there in my town after 桃の節句 (peach festival) (fig.3 ひな飾り by Tirol-Choco, it’s a chocolate box (^o^). ).

fig.1 white
fig.1 white
fig.2 red
fig.2 red
fig.3 ひな飾り
fig.3 ひな飾り

   All told, I wanted to recite one of spring poems and chose 春風 (Spring wind) by 白居易(樂天). How do you feel?

亦 薺 櫻 一
道 花 杏 枝
春 楡 桃 先
風 莢 梨 發
爲 深 次 苑
我 村 第 中
來 裏 開 梅

  • Rough translation of the poem
    Spring wind makes one of the buds on a branch of Ume tree break in the imperial garden
    Cherry, apricot, peach and pear following
    It opens shepherd’s purse flowers and rustles shells of elm fruits in my village nearby mountains
    It makes me happy because I also have the spring wind

   If you read the poem, read top to bottom and right to left.

Categories
everyday life

Smoke signals.

同一記事の日本語版

   I got an e-mail from Delonix on March 1st. Its subject is ‘Smoke signals’, he-he. He wrote “every time I try to go to your blog it shows this message: Forbidden You don’t have permission to access / on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.“. This is 403 Forbidden default message.

   I asked him to create a topic on o6asan’s BBS. And then I checked up my access-denied.conf file. I control the accesses by the conf file. Of course you can do it by .htaccess files and I think it is more common method. Anyway I found his current IP address and removed it. Now he can access my site.

403 Forbidden   Delonix and I sometimes exchange e-mails, so we know our email addresses each other. But for not close visitors I think I need to customize 403 Forbidden message. So I made a 403.html file. You see its text on the right image.

   For 403 ErrorDocument I need to add the following lines, shown in bold, to the access-denied.conf file and to reboot my Apache httpd.
<Directory “G:/WEB”>   <<— G:/WEB is my document root.
<RequireAll>
Require all granted
Require not ip xxx.xxx.xxx.xxx/xx
Require not ip yyy.yyy.yyy.yyy/yy
</RequireAll>
<Files “403.html”>
Require all granted
</Files>

</Directory>

   That’s it!!

Categories
Uncategorized

Updating to Apache 2.4.12.

同一記事の日本語版

   Apache HTTP Server 2.4.12 was released. It includes four security patches for CVE-2014-3583, CVE-2014-3581, CVE-2014-8109 and CVE-2013-5704. In the httpd-ssl.conf the following lines were added. There was no release of 2.4.11.

  • # OCSP Stapling (requires OpenSSL 0.9.8h or later)
    #
    # This feature is disabled by default and requires at least
    # the two directives SSLUseStapling and SSLStaplingCache.
    # Refer to the documentation on OCSP Stapling in the SSL/TLS
    # How-To for more information.
    #
    # Enable stapling for all SSL-enabled servers:
    #SSLUseStapling On

    # Define a relatively small cache for OCSP Stapling using
    # the same mechanism that is used for the SSL session cache
    # above. If stapling is used with more than a few certificates,
    # the size may need to be increased. (AH01929 will be logged.)
    #SSLStaplingCache “shmcb:c:/Apache24/logs/ssl_stapling(32768)”

    # Seconds before valid OCSP responses are expired from the cache
    #SSLStaplingStandardCacheTimeout 3600

    # Seconds before invalid OCSP responses are expired from the cache
    #SSLStaplingErrorCacheTimeout 600

   The version was built with openssl-1.0.1l, so the issues told by OpenSSL Security Advisory [08 Jan 2015] were fixed.

   I downloaded httpd-2.4.12-win32-VC11.zip from the ApacheLounge for my Windows7 server. If you need the information about Apache 2.4.x configuration on Windows, see my post ‘To create a Wamp-like Web Server in Windows7-#1.’.

Categories
Vulnerability

I remove Google AdSense until Adobe Flash Player new version coming.

同一記事の日本語版
Update information      Edit(Feb.5)    Edit2(Feb.7)

   Hey guys! I remove Google AdSense until Adobe Flash Player new version coming. Google AdSense is nothing wrong. But it sometimes includes bad sites. At this time, I mean until CVE-2015-0313 fixed, it might have a site which is infected hxxp://www.retilio.com/skillt.swf, Trend Micro calls it SWF_EXPLOIT.MJST. This bad swf spreads rapidly through popular sites, for example, Dailymotion, etc.

   When Adobe Flash Player new version reaches to us, I’ll restore Google AdSense to my sites. m(_”_)m

Edit(Feb.5):
   Hi, they released Adobe Flash Player new version. Now (16:00JST), I’ve confirmed I have the new version 16.0.0.305 on my IE, FireFox and Google Chrome. I strongly recommend everybody updates to the new version immediately.

   I’ll restore Google AdSense to my sites within a few days.

Edit2(Feb.7):
   Google AdSense has been restored.

Categories
Linux

First VPS #7 : How to use the repository for my own.

同一記事の日本語版

   Last time, I created a repository for my own. This time, I’ll write ‘How to use the repository’.

   Log in a CentOS7 I want to use the repository on, for example the VPS, the VM for development environment, and so on.

  1. Install ‘yum-plugin-priorities’.
    Because Base, Updates and Extras repositories have high priority, CentOS doesn’t use my repository package if the same rpm package exists in these three repositories when they are enabled and aren’t changed their priorities. Of course, you can handle this by manual each time, but I prefer using ‘yum-plugin-priorities’ for my frequently used repositories.
    $ sudo yum install yum-plugin-priorities
     
    I think you have to set their priority for frequently used repositories. How do we know what repositories we enable? You can get the information by the next command.
    $ yum repolist
     
    If you do ‘yum repolist all’, you can get the information about all repositories configured.
  2. Create a myrepo.repo in the directory /etc/yum.repos.d.
    $ sudo vi /etc/yum.repos.d/myrepo.repo
    Its text is the followings.
    [myrepo]
    name=o6asan’s original RPM packages
    baseurl=http://www17130ue.sakura.ne.jp/~myrepo/x86_64/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-o6asan
    priority=1
  3. Add ‘priority=2‘ to the last line of [base], [updates] and [extras] in /etc/yum.repos.d/CentOS-Base.repo.
  4. $ wget http://www17130ue.sakura.ne.jp/~myrepo/x86_64/RPM-GPG-KEY-o6asan
    $ sudo mv RPM-GPG-KEY-o6asan /etc/pki/rpm-gpg/

   Now, I’m ready to use my repository. When I use my repository at the first time, CentOS7 asks about importing RPM-GPG-KEY-o6asan and imports it if I give ‘yes’.

Note) How to delete GPG public key from a client PC.
   The client PC doesn’t have the private key. So ‘gpg --delete-key <email@address>’ gives ‘Unknown system error’. The next command works.
  $ sudo rpm -e [package]

   For that, you need an exact package name. You can get it by the following.
  $ rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}n'

   For example, you have the following about CentOS-7 Key.
  gpg-pubkey-f4a80eb5-53a7ff4b –> gpg(CentOS-7 Key (CentOS 7 Official Signing Key) )
   So you can delete it by the next command.
  $ sudo rpm -e gpg-pubkey-f4a80eb5-53a7ff4b

Categories
Linux

First VPS #6 : To create a repository for my own.

同一記事の日本語版

   I want to configure my system with event + suEXEC + FPM on さくらの VPS.
   For that I rebuilt php.rpms with ‘--enable-fpm’, but I got fed up with all the dependency things when I used ‘rpm -ivh’. So I decided to create a repository for my own, ha-ha.

    On the VPS

  1. $ sudo adduser --gid xxxx myrepo
    ‘myrepo’ is a user for the repository and ‘xxxx’ is the gid of the httpd user group.
    $ sudo passwd myrepo
  2. $ sudo chmod 710 /home/myrepo
  3. $ sudo su - myrepo
  4. $ mkdir public_html
  5. $ cd public_html
  6. $ mkdir x86_64
  7. $ exit

   I haven’t written it yet, but I already configure Apache httpd for suEXEC Support. So I have new User and Group on the httpd.conf. If you use the settings on this post for your repository, read my words about httpd configuration on the post as your words on your system.
 
   I removed ‘Options Indexes’ from the httpd conf files, but want to show the indexes of the repository directory. For that I need to use ‘Options Indexes’ in the .htaccess file. So I did the following things.

    About httpd on the VPS

  1. Change the followings about the userdir.conf (/etc/httpd/conf.d/userdir.conf).
    UserDir enabled normuser1 —>> UserDir enabled normuser1 myrepo
        ↑ This is not for .htaccess but for the user ‘myrepo’.
    AllowOverride FileInfo AuthConfig Limit Indexes
    —>> AllowOverride FileInfo AuthConfig Limit Indexes Options=Indexes
  2. $ sudo systemctl restart httpd.service
  3. $ sudo su - myrepo
  4. $ cd public_html/x86_64
  5. $ vi .htaccess
    Its text is ‘Options Indexes’.
  6. $ chmod 640 .htaccess
  7. $ exit
    On the VM for development environment.

  1. Log on as the user ‘rpmbuilder’ and rebuild all the rpm files I want.
     
    Note 1) On the post ‘First VPS #5’, I wrote how to rebuild php.rpm. That’s nothing wrong, but yum gives ‘Package PACKAGE_NAME.rpm is not signed’ when I used my repository. We need a signature for rpm files when we use them by yum though we can avoid it by the option ‘--nogpgcheck’ and I used the option for my filezilla.rpm installation.
  2. Add my signature to the rpm files.
    $ rpm --addsign rpmbuild/RPMS/x86_64/*
     
    Of course, I need GPG Keys before this step.

    • Log on the VM as a root privilege user.
      $ sudo gpg --gen-key
      $ sudo gpg --export -a 'o6asan' > RPM-GPG-KEY-o6asan
      RPM-GPG-KEY-o6asan is my public key file. I upload this to /x86_64 in myrepo’s DocumentRoot on the VPS by Filezilla client.
      $ sudo gpg -o file.secret --export-secret-key o6asan
      file.secret is my private key file. I move this to rpmbuilder’s home directory.
      $ sudo mv /home/vmowner/file.secret /home/rpmbuilder/file.secret
    • Log on the VM as the user ‘rpmbuilder’
      $ gpg --import file.secret
      This command imports both secret and public keys.
       
      $ vi .rpmmacros
      Add the next two lines.
      %_signature gpg
      %_gpg_name <Owner name>
       
      Note 2) Actually, I wanted to create the keys as ‘rpmbuilder’ because I rebuild the rpm files as ‘rpmbuilder’. But I couldn’t. To create GPG Keys requires root privilege.
  3. Upload all the rpm files to /x86_64 in myrepo’s DocumentRoot on the VPS.
  4. On the VPS.
    $ sudo yum install createrepo
    $ sudo createrepo /path to/x86_64

   Now, I have a repository for my own and the URL is http://www17130ue.sakura.ne.jp/~myrepo/x86_64/.
   I’ll write ‘How to use the repository for my own’ for the next post.

Categories
Windows

Updating to PHP5.6.5.

同一記事の日本語版

   They released PHP5.6.5 Windows version on Jan-22 03:24:41UTC. It fixes several bugs as well as CVE-2015-0231 (bug #68710), CVE-2014-9427 (bug #68618) and CVE-2015-0232 (bug #68799).
   I couldn’t find “Fixed bug #68799” on the PHP5.6.5 ChangeLog though it’s on 5.5.21’s. Did they forget to write it? Anyway, I updated my PHP from 5.6.4 to 5.6.5 on my Web server (Windows7HP+SP1(x86)).

   If you need more information for the configuration, see the post “Migrating from PHP 5.5.16 to PHP 5.6.0 on Windows”.

Categories
Linux

First VPS #5 : To rebuild php.rpm.

同一記事の日本語版

   My original plan for this post was to write an article about suEXEC Support. I want to configure my system with event + suEXEC + FPM on さくらの VPS. About event + suEXEC on Apache httpd it’s OK by CentOS7 default. But about FPM I found a big problem. The default php.rpm of CentOS 7 seems to have no ‘–enable-fpm‘ option at its build. This information you can have by the following command. For this you need to install the package ‘php-devel’. We cannot get the information by ‘php -i’ when we use CentOS rpms.
$ php-config --configure-options
 
   So I have to rebuild the php.rpm with ‘–enable-fpm’. Is this really necessary? Well, OK (^^;).
   I don’t build rpms on my VPS because I don’t want to install devel packages on the VPS, so I created a virtual PC for development environment in the NJ2100. For the virtual PC I used VMware(R) Player 6.0.4 build-2249910 and CentOS7 (Select ‘Development and Creative Workstation’ and check ‘Development Tools’). See the post “How to create a Virtual PC in Windows7 and run CentOS6.4 on it” for reference.
 
   I almost had the same results except about Ethernet. The NJ2100 has SiS Ethernet Controller and CentOS7 on VMware(R) Player couldn’t find the device out. How can I fix this issue? I found a lot of pages about it on the Internet and I’ll recommend this page for you though it’s Japanese.
 
   They tell me the same thing, i.e. use vmnetcfg.exe and vmnetcfglib.dll. They say that VMware Workstation Free Trial version like VMware-workstation-full-10.0.x-xxxxxxx.exe includes the two files. But there was a problem. We can download VMware Workstation 10 still now if we need a production version, but about Free Trial version we can download VMware Workstation 11 only from the vender site right now. Though I downloaded ‘VMware-workstation-full-11.0.0-2305329.exe’ and took a look in the file, I couldn’t find the two files.
 
   I looked for VMware Workstation 10 on the Internet. FINALLY, I got it from filehorse.com and had the two files. Do you need them? I made a zip for you. Is this act gray or illegal? Anyway I had a VM for development environment.
 
   Now I’ll write to rebuild the php.rpm. All procedures I did on the virtual machine and see the official page for reference.

  1. I make an unprivileged user(rpmbuilder) for building RPMs and and create the user mockbuild which is a no logon user. It seems to be used by the command ‘rpm’ and originated in IUS.
    $ sudo useradd rpmbuilder
    $ sudo passwd rpmbuilder
     
    $ sudo useradd -s /sbin/nologin mockbuild
  2. Create directories for RPM building under rpmbuilder’s home.
    $ sudo su - rpmbuilder
    $ mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
    $ echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
  3. Download the source rpm from vault.centos.org.
    $ wget http://vault.centos.org/7.0.1406/updates/Source/SPackages/
    php-5.4.16-23.el7_0.3.src.rpm
  4. Install.
    $ rpm -ivh php-5.4.16-23.el7_0.3.src.rpm
  5. Edit php.spec
    $ $ cd ~/rpmbuild/SPECS/
    $ vi php.spec
    Add ‘–enable-fpm ‘ as the line 869.
  6. $ rpmbuild -ba php.spec
     
    It shows packages resolving Dependencies. Install all of them. After that try again.
    $ rpmbuild -ba php.spec
     
    Now I had a php.rpm with ‘–enable-fpm’ option.

   By the way, my VM has GUI, so I wanted to use FileZilla as FTP client software. But I couldn’t find its rpm on the official repositories. Then I made a filezilla.rpm. For this I needed the package wxGTK3-devel, so I installed epel repository.

  1. $ sudo yum install epel-release
  2. $ wget ftp://fr2.rpmfind.net/linux/fedora/linux/development/rawhide/source/
    SRPMS/f/filezilla-3.10.0-1.fc22.src.rpm

    $ rpm -ivh filezilla-3.10.0-1.fc22.src.rpm
    $ cd ~/rpmbuild/SPECS/
    $ rpmbuild -ba filezilla.spec

   That’s it!

Categories
everyday life

Happy New Year!

おめでとう!   Happy New Year! It is the beginning of a new year.

   This is a year of Hitsuji, according to the Oriental Zodiac.

   We call ‘hitsuji’ ‘sheep’ in English. The illustration of this greeting card uses Hiragana “ひつじ” and the illustrator pulls the Hiragana into a real sheep shape. Can you see it? My guess tells it’s funny and cool v(^o^)v.

   I wish you guys Happy New Year.

   Gods bless you, guys!

Categories
WordPress

First VPS #4 : How to install WordPress on CentOS7.

同一記事の日本語版

   The さくらの VPS trial period ended on December 2nd. But I continue to use because I have some other things I want to challenge. Maybe I’ll pay monthly charge once or more.

   I’ll write “How to install WordPress”. If you do, you must finish First VPS #1, First VPS #2 and First VPS #3 as the prerequisites, of course. First, I install a WordPress as a Wheel Group User (Mine is centos), i.e like a root user.

Note) ||SELinux and WordPress|| (See httpd_selinux(8))

  1. When I used an install feature such as a plugin’s on WordPress, I had “Failed to connect to FTP Server http://VPS_DomainName/”. This seems to occur because Apache Httpd cannot access the network. The solution is “httpd_can_network_connect –> on”.
    $ sudo setsebool -P httpd_can_network_connect on
  2. When I uploaded an image via WordPress, I had “Unable to create directory wp-content/uploads/year/date. Is its parent directory writable by the server?”. At that time, the parent directory permission was 707. This trouble seems to occur because Apache Httpd cannot read/write the directory due to its context. It fixes the trouble to change the context from ‘httpd_user_content_t’ to ‘httpd_sys_rw_content_t’. But, this brought another issue to me. After the change I could not see the directory from my FTP client software.
    If you don’t care about it, you don’t need to do anything else. But, I care. I sometimes back images up via FTP.
     
    I looked for another solution. And I found it out.
    I change the context not to ‘httpd_sys_rw_content_t’ but to ‘public_content_rw_t’. And I also need ‘httpd_anon_write –> on’ for uploading an image via WordPress.
    $ sudo setsebool -P httpd_anon_write on
    $ sudo semanage fcontext -a -t public_content_rw_t
    "/path/to/wp-content/uploads(/.*)?"

    $ sudo /sbin/restorecon -RF /path/to/wp-content/uploads

    Ref URL: 5.6.2. Persistent Changes: semanage fcontext
    This says ‘restorecon -R’ works but I needed ‘restorecon -RF’ to change the type of the directory though I don’t know why.

||How to install WordPress as a Wheel Group User||

  1. Log in phpMyAdmin as root.
  2. Create a database (something like wordpressdb) for WordPress with the collation ‘utf8_general_ci’.
  3. Create a user (something like wordpressuser) for WordPress with localhost and passphrase.
    GRANT USAGE ON *.* TO wordpressuser@localhost IDENTIFIED BY PASSWORD ‘passphrase’;
     
    Edit privileges. Give the user all privileges except grant about the database ‘wordpressdb’. Give no global privileges. This is important.
    GRANT ALL PRIVILEGES ON wordpressdb.* TO wordpressuser@localhost;
  4. Log out.

——————–

  1. Log on the VPS as centos via SSH. After that, you are at /home/centos.
  2. $ mkdir tmp
    $ chmod 707 tmp

    The tmp folder is for download files.

  3. $ cd tmp
     
    Install ‘wget’ if you don’t have it.
    $ sudo yum install wget
     
    Download WordPress and copy to the install folder.
    $ wget https://wordpress.org/latest.tar.gz
    $ tar xzvf latest.tar.gz
    $ rsync -avP ~/tmp/wordpress/ ~/www/html/wp/
  4. Make the uploads folder.
    $ mkdir ~/www/html/wp/wp-content/uploads
    $ chmod 707 uploads
     
    Change the context type.
    $ sudo semanage fcontext -a -t public_content_rw_t
    "/home/centos/www/html/wp/wp-content/uploads(/.*)?"

    $ sudo /sbin/restorecon -RF /home/centos/www/html/wp/wp-content/uploads

——————–

  1. Access http://VPS_DomainName/wp/ by the Web browser.
  2. At the instillation the wp-config.php wasn’t made automatically. So I made it from the installer showing text by an editor and uploaded it to the VPS via FTP. Set the permission of wp-config.php to 404.
    Otherwise, the WordPress installation normally ended.
     
    Note) I couldn’t make the WordPress got the FTP account information automatically, so I added the followings to the wp-config.php before the line /* That’s all, stop editing! Happy blogging. */. They are for correcting the update issues.
    Ref URL: WordPress Upgrade Constants
     
    define('FTP_USER', 'username');
    define('FTP_PASS', 'password');
    define('FTP_HOST', 'VPS_DomainName');

 
   My PHP is running as a DSO (Apache 2.0 Handler). After the configurations above, the environment gives me ‘centos:centos’ as the owner:group about the upgrading WordPress files but it gives ‘apache:apache’ about the media files which were uploaded from Dashboard. So, by FTP client software I cannot modify the media files though I can back them up because of the user ‘centos‘. And I can change the owner:group by ‘chown’ command via SSH.
 
   This matter gives bigger problems when a person use a normal User. Next I’ll write an installation as a normal user.
 
||How to install WordPress as a normal User||
   Of course you cannot do Server-side works as a normal user. It requires your login user has administrative privileges like my centos.

    [Server Side]——

  1. Log on the VPS as centos via SSH. Make a normal user.
    $ sudo adduser normuser1
    $ sudo passwd normuser1
    Changing password for user normuser1.
    New password:
    Retype new password:
    $ sudo chmod 701 /home/normuser1
  2. Edit /etc/httpd/conf.d/userdir.conf.
    $ sudo vi /etc/httpd/conf.d/userdir.conf Ref URL: UserDir Directive

    • Add UserDir enabled normuser1 after the line UserDir disabled
    • Add UserDir www/html after the line #UserDir public_html
    • <Directory "/home/*/public_html">
      —>> <Directory "/home/*/www/html">
    • Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
      —>> Options MultiViews SymLinksIfOwnerMatch IncludesNoExec
  3. $ su - normuser1
    $ mkdir www
    $ cd www
    $ mkdir html
     
    Check normuser1 id’s property.
    $ id -a normuser1
    uid=1001(normuser1) gid=1001(normuser1) groups=1001(normuser1)
    $ exit
    $ sudo systemctl restart httpd.service
  4. $ sudo gpasswd -a sennari apache
    Check normuser1 id’s property.
    $ id -a normuser1
    uid=1001(normuser1) gid=1001(normuser1) groups=1001(normuser1),48(apache)
  5. Log in phpMyAdmin as root from the Web browser.
     
    Create a database (something like normuser1db) with the collation ‘utf8_general_ci’ for WordPress.
    Create a user (something like normuser1wp) for WordPress with localhost and passphrase.
    GRANT USAGE ON *.* TO normuser1wp@localhost IDENTIFIED BY PASSWORD ‘passphrase’;
     
    Edit privileges. Give the user all privileges except grant about the database ‘normuser1db’. Give no global privileges. This is important.
    GRANT ALL PRIVILEGES ON normuser1db.* TO normuser1wp@localhost;
     
    Logout.
    [Client Side]——

  1. Access normuser1’s DocumentRoot by FTP client software.
    Upload an index.html file as a test. Go and see http://VPS_DomainName/~normuser1/ for a test.
     
    As an aside, I used a base64 encoded in-line image scheme for this index.html (^^).
  2. Create a wp folder in the DocumentRoot by the FTP client software.
    Upload all WordPress files into the wp folder via FTP.
  3. Access http://VPS_DomainName/~normuser1/wp/ by the browser and install WordPress.
     
    At the instillation the wp-config.php wasn’t made automatically. So I made it from the installer showing text by an editor and uploaded it to the VPS via FTP. Set the permission of wp-config.php to 404 .
    Otherwise, the WordPress installation normally ended.
     
    Note) I couldn’t make the WordPress got the FTP account information automatically, so I added the followings to the wp-config.php before the line /* That’s all, stop editing! Happy blogging. */. They are for correcting the update issues.
    Ref URL: WordPress Upgrade Constants
     
    define('FTP_USER', 'username');
    define('FTP_PASS', 'password');
    define('FTP_HOST', 'VPS_DomainName');

   After the steps above, I upgraded WordPress 4.0 to 4.1. It successfully ended. But I could not uploaded media files in spite I had made a uploads folder with its permission 707. So, I did the followings.

  1. By the FTP client software, set the permission of uploads folder to 775 because apache needs full access rights to it.
  2. Next three I did as the user centos via SSH. Normal users cannot do them. I think this is very inconvenient when people run production sites with multiple users because two of these three I could not do until making the uploads folder.
    • $ sudo chown -R normuser1:apache
      /home/normuser1/www/html/wp/wp-content/uploads
    • $ sudo semanage fcontext -a -t public_content_rw_t
      "/home/normuser1/www/html/wp/wp-content/uploads(/.*)?"
    • $ sudo restorecon -RF /home/sennari/www/html/wp/wp-content/uploads

   Now I have a question. Why does WordPress use different methods about upgrades and media uploads? If it use the method of upgrades for media file uploads, the troubles probably do not occur. Though I don’t realize as I don’t know much about PHP, does the same method for both make something wrong?
 
   Anyway, I’ll try suEXEC Support.