Difference between revisions of "Useful linux commands"
From www.b-kaempgen.de
Line 4: | Line 4: | ||
* Size of files in specific folder: du -sh * | * Size of files in specific folder: du -sh * | ||
* Size of folder: du -hs data/index/* | * Size of folder: du -hs data/index/* | ||
+ | |||
+ | |||
+ | ==httpd 403 error despite 777 rights?== | ||
+ | <pre> | ||
+ | |||
+ | |||
+ | |||
+ | 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 | ||
+ | |||
+ | |||
+ | </pre> | ||
+ | |||
+ | * See [http://serverfault.com/questions/396036/apache-httpd-permissions/427725] | ||
[[Category:Howto]] | [[Category:Howto]] |
Latest revision as of 20:11, 31 January 2017
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
- See [1]