• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

How to give apache permission to write to home directory?

phpapache


PHP Snippet 1:

chmod 0777 /home/djameson/test.txt

PHP Snippet 2:

sudo chown www-data:www-data /home/djameson/test.txt
chmod 0744 /home/djameson/test.txt

PHP Snippet 3:

sudo usermod -a -G www-data djameson
chmod 0764 /home/djameson/test.txt

PHP Snippet 4:

chown -R apache /full-path-to-target-folder/
chcon -R -t httpd_sys_rw_content_t /full-path-to-target-folder/

Related Snippets

How do I set the maximum php memory limit

php retrieve specific data onclick from database in a list format

How to fix " Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() " problem in php 7.1.3 and jpgraph 4.2.6?

Show Custom Data in Woocommerce Order Details Admin Area

PHP block shortcut in Visual Studio Code

Laravel Command Schedule Not Working Properly

file_put_content...fail to open stream:Permission denied in Laravel 5

Inserting Country Selection into MySQL PHP [duplicate]

PHPUnit (Phar) Fatal Error Only When Test Fails

Ajax GET request fails in laravel 8

Laravel 8 factory state afterCreating

Wordpress how to get the post thumbnail inside a figure tag

Yii2: How to download backup files using spanjeta/yii2-backup?

Issue saving card for customer

WHM Enabling mod_rewrite

About Contact Privacy policy Terms and conditions