Useful linux commands

From www.b-kaempgen.de
Jump to: navigation, search

Here I add Linux commands that I often use.

  • Size of files: du -a -h
  • Size of files in specific folder: du -sh *
  • Size of folder: du -hs data/index/*


httpd 403 error despite 777 rights?




What you have to do is copy the same security context /var/www/html has. To do this:

# ls -la --context /var/www/html
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t .
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t ..
-rw-r--r-- root root user_u:object_r:httpd_sys_content_t index.html

Then you have to set it to your desire DocumentRoot as follows:

# chcon -R system_u:object_r:httpd_sys_content_t /xyz/www