Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by tcloud
at 2024-07-31 08:31:04
Point:500 Replies:18 POST_ID:829186USER_ID:12076
Topic:
Apache Web Server;;Linux
I am able to get to the root of a web server, but all the sub-folders are getting access denied. chmod permissions are set to 755 for all files and folders, and are owned by root:root.
Any assistance would be greatly appreciated.
Any assistance would be greatly appreciated.
Attachment:httpd.conf.txt
Expert: mugojava replied at 2024-07-31 09:30:17
Having 20 years experience, I'm never positive until the end. If dropping the shields for a minute to test is an issue for him, he has much bigger issues.
Take care now.
Glad you got it going rcloud!!
Take care now.
Glad you got it going rcloud!!
Expert: _jesper_ replied at 2024-07-31 09:20:00
because mugojava, i was *positive* that selinux was at least one of the issues having worked with it for several years.
Expert: _jesper_ replied at 2024-07-31 09:19:14
you just removed a layer of security. definitely not the route to go.
Expert: mugojava replied at 2024-07-31 09:19:08
It's a test. It can be turned back on ;) (setenforce 1)
Why change context when you are not sure it's the issue in the first place?
Really.
Why change context when you are not sure it's the issue in the first place?
Really.
Author: tcloud replied at 2024-07-31 09:17:30
SELINUX was it -- Thanks everyone!
Expert: _jesper_ replied at 2024-07-31 09:17:02
ugh. don't turn off selinux except to verify that selinux is the issue. just fix the labels.
here is a good set of commands:
http://wiki.centos.org/HowTos/SELinux#head-0f6390ddacfab39ee973ed8018a32212c2a02199
here is a good set of commands:
http://wiki.centos.org/HowTos/SELinux#head-0f6390ddacfab39ee973ed8018a32212c2a02199
Accepted Solution
Expert: mugojava replied at 2024-07-31 09:14:18
500 points EXCELLENT
that "." at the end of your permissions means you have selinux ACLs in place, probably denying access.
Try
setenforce 0
then try to hit it again and see what happens.
Try
setenforce 0
then try to hit it again and see what happens.
Expert: _jesper_ replied at 2024-07-31 09:13:42
chcon -Rv --type=httpd_sys_content_t /html
Author: tcloud replied at 2024-07-31 09:10:09
[root@kayako setup]# ls -lZd /var/www/html/setup
drwxrwxr-x. root apache unconfined_u:object_r:user_tmp_t:s0 /var/www/html/setup
[root@kayako setup]#
[root@kayako html]# ls -la setup
total 32
drwxrwxr-x. 2 root root 4096 Jul 27 23:17 .
drwxr-xr-x. 16 root root 4096 Jul 27 23:17 ..
-rwxrwxr-x. 1 root root 694 Jul 21 05:20 console.setup.php
-rwxrwxr-x. 1 root root 696 Jul 21 05:20 console.upgrade.php
-rwxrwxr-x. 1 root root 1086 Jul 21 05:20 favicon.ico
-rwxrwxr-x. 1 root root 141 Jul 27 23:17 index.html
-rwxrwxr-x. 1 root root 626 Jul 21 05:20 index.php
-rwxrwxr-x. 1 root root 68 Jul 27 23:05 phpinfo.php
drwxrwxr-x. root apache unconfined_u:object_r:user_tmp_t:s0 /var/www/html/setup
[root@kayako setup]#
[root@kayako html]# ls -la setup
total 32
drwxrwxr-x. 2 root root 4096 Jul 27 23:17 .
drwxr-xr-x. 16 root root 4096 Jul 27 23:17 ..
-rwxrwxr-x. 1 root root 694 Jul 21 05:20 console.setup.php
-rwxrwxr-x. 1 root root 696 Jul 21 05:20 console.upgrade.php
-rwxrwxr-x. 1 root root 1086 Jul 21 05:20 favicon.ico
-rwxrwxr-x. 1 root root 141 Jul 27 23:17 index.html
-rwxrwxr-x. 1 root root 626 Jul 21 05:20 index.php
-rwxrwxr-x. 1 root root 68 Jul 27 23:05 phpinfo.php
Expert: mugojava replied at 2024-07-31 09:08:28
Which app are you trying to setup? Have you checked your .htaccess in that directory, so see if one exists and can possibly be blocking?
You may have an /alias for that directory that's blocking somehow.
Many times, depending on what app you are trying to install, you have to change something in htaccess to allow setup, then change it back to secure...it's a "security" feature many installs use.
Rule out selinux and htaccess first.
You may have an /alias for that directory that's blocking somehow.
Many times, depending on what app you are trying to install, you have to change something in htaccess to allow setup, then change it back to secure...it's a "security" feature many installs use.
Rule out selinux and htaccess first.
Expert: _jesper_ replied at 2024-07-31 09:08:01
Also, if you have selinux running, verify the security permissions:
ls -lZd /var/www/html/setup
and
ls -lZ /var/www/html/setup
ls -lZd /var/www/html/setup
and
ls -lZ /var/www/html/setup
Expert: duncanb7 replied at 2024-07-31 09:05:29
pls, "ls -la" on the sub-folder and sub-folder directory itself , send it to us
Author: tcloud replied at 2024-07-31 09:03:24
mugojava,
I have a phpinfo.php in /var/www/html/ and one in /var/www/html/setup/ -- I cannot access the one in the setup.
I have a phpinfo.php in /var/www/html/ and one in /var/www/html/setup/ -- I cannot access the one in the setup.
Author: tcloud replied at 2024-07-31 09:01:57
Duncan,
that changed permissions back to root:root, and did not resolve the issue. Note that the /var/www/html folder (wwwroot) also has root:root permissions, and I am able to access the files in that folder via web page.
Thanks!
that changed permissions back to root:root, and did not resolve the issue. Note that the /var/www/html folder (wwwroot) also has root:root permissions, and I am able to access the files in that folder via web page.
Thanks!
Expert: mugojava replied at 2024-07-31 08:56:04
That's a clue. /setup to what? In your webroot, try inserting a plain vanilla "index.htm" or whatever you have your indexes set to, with a simple "Hello World" or some text in it.
Are you trying to install a php web app? If so, that would be good information. Many setups for php / web apps need at least temporary rwx. You can see if this is really a permissions problem or an IP allowed problem by temporarily chmoding the directory to 777. If it works, you know permissions are the right tree. If not, then something else is amiss.
Also, is SELinux enforcing? You may set that off too -
setenforce 0
But don't do both at once, try one at a time so you know what "fixed" the issue.
Also, your .htaccess may be redirecting to /setup (not sure if you are hitting that directory by naming in the URL, or you are being redirected to it)
Are you trying to install a php web app? If so, that would be good information. Many setups for php / web apps need at least temporary rwx. You can see if this is really a permissions problem or an IP allowed problem by temporarily chmoding the directory to 777. If it works, you know permissions are the right tree. If not, then something else is amiss.
Also, is SELinux enforcing? You may set that off too -
setenforce 0
But don't do both at once, try one at a time so you know what "fixed" the issue.
Also, your .htaccess may be redirecting to /setup (not sure if you are hitting that directory by naming in the URL, or you are being redirected to it)
Expert: duncanb7 replied at 2024-07-31 08:51:16
change group at the sub-folder under root access and myloginname is next time you want
to login as user with username
cd your sub-folder
chgrp -R -v myloginname *
if not okay, also change group for the sub-folder itself
Duncan
to login as user with username
cd your sub-folder
chgrp -R -v myloginname *
if not okay, also change group for the sub-folder itself
Duncan
Author: tcloud replied at 2024-07-31 08:44:37
[Thu Jul 31 10:40:55 2014] [error] [client 10.1.80.21] (13)Permission denied: access to /setup/ denied
Expert: mugojava replied at 2024-07-31 08:35:36
Set the owner.group under your web root to root.apache recursively.
Also, check your httpd log, especially the error_log (however you have it named).
Also, check your httpd log, especially the error_log (however you have it named).